Originally Posted by JustinSton
Olha o comando
/depositar /sacar que vocк vai entender o porque. |
EU ACHO |
if(strcmp(cmd, "/depo", true) == 0 || strcmp(cmd, "/depositar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLocal] != 103)
{
SendClientMessage(playerid, COLOR_GREY, " Voce nгo esta no banco! !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /depositar [quantia]");
format(string, sizeof(string), " Voce tem R$%d na sua conta.", PlayerInfo[playerid][pConta]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /depositar [quantia]");
format(string, sizeof(string), " Voce tem R$%d na sua conta", PlayerInfo[playerid][pConta]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoneyEx(playerid) || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " Voce nгo tem tudo isso na sua conta!");
return 1;
}
GivePlayerMoneyEx(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pConta];
PlayerInfo[playerid][pConta]=cashdeposit+PlayerInfo[playerid][pConta];
SendClientMessage(playerid, COLOR_WHITE, "|___ BANCO INFO ___|");
format(string, sizeof(string), " Conta: R$%d", curfunds);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), " Deposito: R$%d",cashdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
format(string, sizeof(string), " Nova conta: R$%d", PlayerInfo[playerid][pConta]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
return 1;
}
if(PlayerInfo[playerid][pLocal] != 103)
if(IsPlayerInRangeOfPoint(blablablabla)