else if (strcmp(cmd, "!givecash", true) == 0) {
new tmp2[256], plr;
tmp = strtok(cmdtext, idx), tmp2 = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if (!strlen(tmp2)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !givecash [Nick/ID] [Amount]");
else if (GetPlayerHandCash(gPlayers[playerid]) < StrToInt(tmp2)) SendClientMessage(playerid,COLOR_GREEN, "Error: You havent got the needed money.");
else if (plr != INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else if(!IsPlayerRegistered(gPlayers[plr])) SendClientMessage(playerid, COLOR_RED, "Error: That nick is not registered!");
else if (!IsNumeric(tmp2)) SendClientMessage(playerid,COLOR_GREEN, "Error: Invalid Amount!");
else {
format(szMsg,sizeof(szMsg),"You have sent:[ $%d ] to:[ %s ]",tmp,gPlayers[playerid]);
SendClientMessage(playerid,COLOR_GREEN, szMsg);
DecPlayerHandCash(playerid,StrToInt(tmp));
IncPlayerHandCash(plr,StrToInt(tmp));
}
return 1;
}
rare :/