Skripta koju koristim:NBE
Detaljan opis problema: Nece mi kupit ulicu
Dio skripte:if(strcmp(cmd, "/buystreet", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
if(PlayerInfo[playerid][pUlica] != 255)
{
SendClientMessage(playerid, COLOR_WHITE, " Ti vec imas ulicu!");
SendClientMessage(playerid, COLOR_GREY, "Ako mislis da je ovo neki bug.");
SendClientMessage(playerid, COLOR_GREY, "Idi u opstinu i skini kljuc.");
return 1;
}
for(new b = 0; b < sizeof(UlicaInfo); b++)
{
if(PlayerToPoint(2.0, playerid, UlicaInfo[b][uUlicaX], UlicaInfo[b][uUlicaY], UlicaInfo[b][uUlicaZ]) && UlicaInfo[b][uUlicaKupljena] == 0)
{
if(PlayerInfo[playerid][pLevel] < UlicaInfo[b][uLevelZaUlicu])
{
format(string, sizeof(string), "Moras biti level %d da bi kupio ovo.",UlicaInfo[b][uLevelZaUlicu]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(JBC_GetPlayerMoney(playerid) > UlicaInfo[b][uCenaUlice])
{
//Delete3DTextLabel(Text3D:ulicasale);
PlayerInfo[playerid][pUlica] = b;
UlicaInfo[b][uUlicaKupljena] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(UlicaInfo[b][uVlasnik], sendername, 0, strlen(sendername), 255);
JBC_GivePlayerMoney(playerid,-UlicaInfo[b][uCenaUlice]);
UlicaInfo[b][uCenaUlice] += 100000;
PlayerPlayMusic(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Cestitamo na novoj kupovini !");
new stringul1[500];
format(stringul1, sizeof(stringul1), "%s\nU vlasnistvu\nVlasnik ulice: %s\nCena ulice: $%d\nPotreban level: %d\n/streethelp",UlicaInfo[b][uImeUlice],UlicaInfo[b][uVlasnik],UlicaInfo[b][uCenaUlice],UlicaInfo[b][uLevelZaUlicu]);
Update3DTextLabelText(ulicasale, 0x00FFF9FF, stringul1);
//Delete3DTextLabel(Text3D:ulicasale);
DateProp(playerid);
OnPropUpdate();
SacuvajIgraca(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Nemate novca za to.");
return 1;
}
}
}
}
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): -