11.04.2011, 11:19
what is problem with this script? I can withdraw money where ever I Want
help plss
help plss
Код:
if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
{
SendClientMessage(playerid, SIVA, " Niste blizu Bankomata !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, " Nemate toliko puno Novaca !");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
return 1;
}



: warning 225: unreachable code