[POMOC]Kuce

Započeo Matrix_Green, Novembar 20, 2011, 18:37:03 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Kao neka kopirka ch,to mi poslo jedna frend kao da je nasao kopirku croherze
Problem:Imam komandu kupi kucu i neznam di on ucitava kuce koje su na prodaju
Dio skripteif(strcmp(cmd, "/kupikucu", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
{
format(string, sizeof(string), "{F81414}(Odbijeno){CCCCCC} Moras biti Level %d da kupis ovu kucu !", HouseInfo[h][hLevel]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "{F81414}(Odbijeno){CCCCCC} Vec imas kucu, ukucaj /prodajkucu ako zelis kupiti ovu !");
return 1;
}
if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
{
PlayerInfo[playerid][pPhousekey] = h;
HouseInfo[h][hOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
GivePlayerMoney(playerid,-HouseInfo[h][hValue]);
Proracunsys[ProracunAmmount] += 2000;//pri kupnji kuce 2k ide u proracun, ovo je novo
PlayerPlayMusic(playerid);
SetPlayerInterior(playerid,HouseInfo[h][hInt]);
SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
GameTextForPlayer(playerid, "~w~Dobrodosli kuci~n~Mozete izaci iz kuce kad god hocete ukucavsi blizu vrata /exit", 5000, 3);
PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
PlayerInfo[playerid][pLocal] = h;
SendClientMessage(playerid, COLOR_WHITE, "Cestitamo na vasoj novoj kuci !");
SendClientMessage(playerid, COLOR_WHITE, "Ukucaj /help za pomoc !");
                        DateProp(playerid);
OnPropUpdate();
OnPlayerUpdate(playerid);
SaveProracun();
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{F81414}(Odbijeno){CCCCCC} Nemas dovoljno novca !");
return 1;
}
}
}
}
return 1;
}
<a href="http://tinypic.com?ref=5l2yrb" target="_blank"><img src="http://i47.tinypic.com/5l2yrb.png" border="0" alt="Image and video hosting by TinyPic"></a>

dragan12

To je GF edit
scriptfiles/cfg/property.cfg
Tamo ti cuva
A ucitavanje ti je pod OnGameModeInit. Mozda je napravljen neki public sa kojim ucitava nesto Prop

EDIT:
Imas public LoadProperty() sa kojim ucitava kuce
Poslednja Izmena: Novembar 20, 2011, 18:42:27 POSLE PODNE od [BD]Gagi

Znaci morma napraviti bas folder cfg ma property ili,jer sam sam dodao property.cfg i kuce al opet ne radi
<a href="http://tinypic.com?ref=5l2yrb" target="_blank"><img src="http://i47.tinypic.com/5l2yrb.png" border="0" alt="Image and video hosting by TinyPic"></a>

dragan12

Citat: sandman12wolf poslato Novembar 20, 2011, 18:42:21 POSLE PODNE
Znaci morma napraviti bas folder cfg ma property ili,jer sam sam dodao property.cfg i kuce al opet ne radi
Da napravi folder taj u scriptfiles i onda to property.cfg i dodaj kuce.
To je GF mod kolko ja znam

a jel ovako dajem kuce
1 story|None|1980.993164|-1682.897094|17.053804|0|0|90.766693|235.265914|1186.702636|1080.257812|3|180.694213|0|0|0|100000|0|0|0|1|
sad te nisam razumio znaci
da otvorim scriptfile i tu napravim cfg folder i dodam property.cfg ili
<a href="http://tinypic.com?ref=5l2yrb" target="_blank"><img src="http://i47.tinypic.com/5l2yrb.png" border="0" alt="Image and video hosting by TinyPic"></a>

dragan12

Citat: sandman12wolf poslato Novembar 20, 2011, 18:50:55 POSLE PODNE
a jel ovako dajem kuce
1 story|None|1980.993164|-1682.897094|17.053804|0|0|90.766693|235.265914|1186.702636|1080.257812|3|180.694213|0|0|0|100000|0|0|0|1|
sad te nisam razumio znaci
da otvorim scriptfile i tu napravim cfg folder i dodam property.cfg ili
Da to treba da napravis.
Evo tut kako pravis kuce http://www.cybershark.rs/forum/showthread.php/40-SA-MP-Tutorijal-Ku%C4%87a

ja dodam kucu i onda mi vrati opet al na ovo 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0,0,0,0,0,0,,,0,0,0,0,0,0,0,0,0,0,0,0,0,324,0
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0,0,0,0,0,0,Drzavna,,0,0,0,0,1,0,0,0,0,0,410,-1,-1,323,0
a kucu nemogu nigjde nac  8)
<a href="http://tinypic.com?ref=5l2yrb" target="_blank"><img src="http://i47.tinypic.com/5l2yrb.png" border="0" alt="Image and video hosting by TinyPic"></a>

dragan12

Citat: sandman12wolf poslato Novembar 20, 2011, 19:15:31 POSLE PODNE
ja dodam kucu i onda mi vrati opet al na ovo 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0,0,0,0,0,0,,,0,0,0,0,0,0,0,0,0,0,0,0,0,324,0
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0,0,0,0,0,0,Drzavna,,0,0,0,0,1,0,0,0,0,0,410,-1,-1,323,0
a kucu nemogu nigjde nac  8)
new HouseInfo[neki broj][nesto]
E taj neki broj je broj kuca u property.cfg stavi tu za taj neki broj broj kuca.

Ma sredio sam dodo sma drugi property.cfg iz gf-a i radi hvala ti moze LOCK
<a href="http://tinypic.com?ref=5l2yrb" target="_blank"><img src="http://i47.tinypic.com/5l2yrb.png" border="0" alt="Image and video hosting by TinyPic"></a>