if(strcmp(cmd, "/bank", true) == 0){
if((getCheckpointType(playerid) != CP_BANK) && IsPlayerInCheckpoint(playerid)){
SendClientMessage(playerid, COLOR_RED, "* You are not in the bank (24/7 store)");
return 1;
}
tmp = strval(strtok(cmdtext, idx));
if(tmp == 0){
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bank [ammount]");
return 1;
}
if(logged[playerid] != 1){
SendClientMessage(playerid, COLOR_RED, "* You are not logged in.");
return 1;
}
if(tmp > GetPlayerMoney(playerid)){
format(string, sizeof(string), "* You dont have $%d", tmp);
SendClientMessage(playerid, COLOR_RED, string);
return 1;
}
if(tmp < 1){
format(string, sizeof(string), "* Wrong value: $%d", tmp);
SendClientMessage(playerid, COLOR_RED, string);
return 1;
}
bank[playerid] = bank[playerid] + tmp;
GivePlayerMoney(playerid, -tmp);
format(string, sizeof(string), "* You have posted $%d on you bank account, Your current balance is: $%d", tmp, bank[playerid]);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}

|
Originally Posted by Burridge
EDIT: sorry, dident read the command prperly, i thought it said /back not /bank
![]() |
LOL