Skripta koju koristim: SN
Detaljan opis problema: ma neradi komanda /deposit /withdraw/ balance....... pise da nisam u banci kako da sredim ?
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno): http://zaslike.com/files/s72yh3oh6vq2or0kog.png
Postaj komande /withdraw /deposit.
Nisu ti dobre kordinate to jest podesi si IsPlayerInRangeOfPoint na tocno.
nemogu da nadzem kordinate........ evo komanda sta je /withdraw
if(strcmp(cmd, "/withdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLocal] != 103)
{
SendClientMessage(playerid, COLOR_GREY, " {00CCFF}SuperNova:{FF0000} Nisi u Banci !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00CCFF}KORISTI:{FFFF00} /withdraw [amount]");
format(string, sizeof(string), " Imas $%d na racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00CCFF}KORISTI:{FFFF00} /withdraw [amount]");
format(string, sizeof(string), " Imas $%d na racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " Nemas toliko novaca!");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Uzeo si $%d sa svog racuna Ostalo: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
return 1;
}
Posto neznam bas oko GF-a probaj da uzmes pLocal odnosno ovo:
if(PlayerInfo[playerid][pLocal] != 103)
i zamenis ovim
if(!IsPlayerInRangeOfPoint(playerid, /* range */, /* x u banci */, /* y u banci */, /* z u banci */);
jel to ovako treba izgledati
if(!IsPlayerInRangeOfPoint(playerid, range, 2308.8684, -13.2484, 26.7422);
Citat: [DT]Gigov.so poslato Jun 09, 2011, 21:06:38 POSLE PODNE
jel to ovako treba izgledati
if(!IsPlayerInRangeOfPoint(playerid, 3, 2308.8684, -13.2484, 26.7422);
Nope ovako:
if(strcmp(cmd, "/withdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 3, 2308.8684, -13.2484, 26.7422)
{
SendClientMessage(playerid, COLOR_GREY, " {00CCFF}SuperNova:{FF0000} Nisi u Banci !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00CCFF}KORISTI:{FFFF00} /withdraw [amount]");
format(string, sizeof(string), " Imas $%d na racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00CCFF}KORISTI:{FFFF00} /withdraw [amount]");
format(string, sizeof(string), " Imas $%d na racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " Nemas toliko novaca!");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Uzeo si $%d sa svog racuna Ostalo: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
return 1;
}
izbacio mi error
C:\Documents and Settings\Antonio\Desktop\sn\gamemodes\sn.pwn(20855) : error 017: undefined symbol "range"
Citat: [DT]Gigov.so poslato Jun 09, 2011, 21:19:41 POSLE PODNE
izbacio mi error
C:\Documents and Settings\Antonio\Desktop\sn\gamemodes\sn.pwn(20855) : error 017: undefined symbol "range"
pa tu moras staviti radijus recimo 30.0 ili 15.0 koliko ti hoces
Citat: [DT]Gigov.so poslato Jun 09, 2011, 21:19:41 POSLE PODNE
izbacio mi error
C:\Documents and Settings\Antonio\Desktop\sn\gamemodes\sn.pwn(20855) : error 017: undefined symbol "range"
Ispravio sam kod vidi sad...
Otisji u banku i ismeri koordinate kod saltera.
/save
Onda otvoris svoj GTA SA User Files i procitas koordinate i ubacis ih u skriptu kao sta ti je eXtreame napisao.. :P
i naravno pre tih koordinata stavis range of point 5 ili 6.. po volji :P
Citat: Lane_Hudson poslato Jun 09, 2011, 21:37:15 POSLE PODNE
Otisji u banku i ismeri koordinate kod saltera.
/save
Onda otvoris svoj GTA SA User Files i procitas koordinate i ubacis ih u skriptu kao sta ti je eXtreame napisao.. :P
i naravno pre tih koordinata stavis range of point 5 ili 6.. po volji :P
Zasto bi koristio /save :) kad moze /rs koji izbacuje:914.9587,-921.1210,42.6016,95.9534 ;
sredio sam to kako sto mi e reko extreme /deposit /balance /withdraw ali izbacio mi 3 errora za neka { obrisao sam i opet error kako da ja popravim
C:\Documents and Settings\Antonio\Desktop\sn RP\gamemodes\sn.pwn(20856) : error 001: expected token: ")", but found "{"
C:\Documents and Settings\Antonio\Desktop\sn RP\gamemodes\sn.pwn(20895) : error 001: expected token: ")", but found "{"
C:\Documents and Settings\Antonio\Desktop\sn RP\gamemodes\sn.pwn(20940) : error 001: expected token: ")", but found "{"
evo i sliku... http://zaslike.com/files/t3fkal746oi0mop1uoxd.jpg
expected toke, znaci da ti ta ) fali negdje dobro pogledaj na toj liniji
ok,hvala puno svima sredio sam moze lock tema :)