Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: El Toni poslato Jun 09, 2011, 10:49:30 PRE PODNE

Naslov: [Pomoc] problem so banka
Poruka od: El Toni poslato Jun 09, 2011, 10:49:30 PRE PODNE
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
Naslov: Odg: [Pomoc] problem so banka
Poruka od: [TG:RP]$--L84S--$ poslato Jun 09, 2011, 10:54:46 PRE PODNE
Postaj komande /withdraw /deposit.
Nisu ti dobre kordinate to jest podesi si IsPlayerInRangeOfPoint na tocno.
Naslov: Odg: [Pomoc] problem so banka
Poruka od: El Toni poslato Jun 09, 2011, 16:25:52 POSLE PODNE
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;
}
Naslov: Odg: [Pomoc] problem so banka
Poruka od: Rotcod poslato Jun 09, 2011, 18:40:04 POSLE PODNE
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 */);
Naslov: Odg: [Pomoc] problem so banka
Poruka od: El Toni poslato Jun 09, 2011, 21:06:38 POSLE PODNE
jel to ovako treba izgledati
if(!IsPlayerInRangeOfPoint(playerid, range, 2308.8684, -13.2484, 26.7422);
Naslov: Odg: [Pomoc] problem so banka
Poruka od: Rotcod poslato Jun 09, 2011, 21:12:25 POSLE PODNE
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;
}
Naslov: Odg: [Pomoc] problem so banka
Poruka od: El Toni 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"
Naslov: Odg: [Pomoc] problem so banka
Poruka od: System32 poslato Jun 09, 2011, 21:20:45 POSLE PODNE
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
Naslov: Odg: [Pomoc] problem so banka
Poruka od: Rotcod poslato Jun 09, 2011, 21:25:06 POSLE PODNE
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...
Naslov: Odg: [Pomoc] problem so banka
Poruka od: Milanče™ 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
Naslov: Odg: [Pomoc] problem so banka
Poruka od: Rotcod poslato Jun 09, 2011, 21:40:14 POSLE PODNE
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 ;
Naslov: Odg: [Pomoc] problem so banka
Poruka od: El Toni poslato Jun 09, 2011, 21:55:39 POSLE PODNE
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
Naslov: Odg: [Pomoc] problem so banka
Poruka od: System32 poslato Jun 09, 2011, 21:56:56 POSLE PODNE
expected toke, znaci da ti ta ) fali negdje dobro pogledaj na toj liniji
Naslov: Odg: [Pomoc] problem so banka
Poruka od: El Toni poslato Jun 09, 2011, 22:04:06 POSLE PODNE
ok,hvala puno svima sredio sam moze lock tema :)