- 0
Nu stiu cum sa adaug mai mult de 7 PlayerToPoint
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
nezuzz47
Am aceasta comanda:
[pawn]
if(strcmp(cmd, "/scoate", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(3.0,playerid,1098.713745,-1802.815429,13.604963) || PlayerToPoint(3.0,playerid,1154.137573,-1456.037109,15.796875) || PlayerToPoint(3.0,playerid,1496.072998,-1749.133911,15.445312) || PlayerToPoint(3.0,playerid,1831.669555,-1172.762329,23.907688) || PlayerToPoint(3.0,playerid,1625.031616,-1136.564697,23.906250) || PlayerToPoint(3.0,playerid,-1981.335083,144.781814,27.687500) || PlayerToPoint(3.0,playerid,1737.4651,-1862.8569,13.5758))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "COMANDA: /scoate [amount]");
format(string, sizeof(string), "Tu ai %d$ in Cont.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "COMANDA: /scoate [amount]");
format(string, sizeof(string), "Tu ai %d$ in Cont.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Nu ai atat de mult !");
return 1;
}
//ConsumingMoney[playerid] = 1;
GivePlayerCash(playerid,cashdeposit);
//hackmoney[playerid] = hackmoney[playerid] + cashdeposit;
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "Ai scos $%d din cont, Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
TextDrawShowForPlayer(playerid, BalanceTextDraw[playerid] );
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Nu esti la ATM !");
return 1;
}
}
return 1;
}
[/pawn]
si as vrea sa adaug mai multe PlayerToPoint in ea dar daca adaug asa:
[pawn]
if(strcmp(cmd, "/scoate", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(3.0,playerid,1098.713745,-1802.815429,13.604963) || PlayerToPoint(3.0,playerid,1154.137573,-1456.037109,15.796875) || PlayerToPoint(3.0,playerid,1496.072998,-1749.133911,15.445312) || PlayerToPoint(3.0,playerid,1831.669555,-1172.762329,23.907688) || PlayerToPoint(3.0,playerid,1625.031616,-1136.564697,23.906250) || PlayerToPoint(3.0,playerid,-1981.335083,144.781814,27.687500) || PlayerToPoint(3.0,playerid,1737.4651,-1862.8569,13.5758)|| PlayerToPoint(3.0,playerid,1737.4651,-1862.8569,13.5758))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "COMANDA: /scoate [amount]");
format(string, sizeof(string), "Tu ai %d$ in Cont.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "COMANDA: /scoate [amount]");
format(string, sizeof(string), "Tu ai %d$ in Cont.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Nu ai atat de mult !");
return 1;
}
//ConsumingMoney[playerid] = 1;
GivePlayerCash(playerid,cashdeposit);
//hackmoney[playerid] = hackmoney[playerid] + cashdeposit;
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "Ai scos $%d din cont, Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
TextDrawShowForPlayer(playerid, BalanceTextDraw[playerid] );
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Nu esti la ATM !");
return 1;
}
}
return 1;
}
[/pawn]
Am erorile astea:
[pawn]
PG.pwn(34523) : error 075: input line too long (after substitutions)
PG.pwn(34525) : error 001: expected token: ",", but found "-rational value-"
PG.pwn(34525) : warning 215: expression has no effect
PG.pwn(34525) : warning 215: expression has no effect
PG.pwn(34525) : error 001: expected token: ";", but found ")"
PG.pwn(34525) : error 029: invalid expression, assumed zero
PG.pwn(34525) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
[/pawn]
2 answers to this question
Recommended Posts