public OnPlayerCommandText(playerid, cmdtext[]) { new command[256], index; command = strtok(cmdtext, index); if(strcmp(command, "/givecash", true) == 0) { new from, to, amount; from = playerid; to = strval(strtok(cmdtext, index)); amount = strval(strtok(cmdtext, index)); if (to < 0 || amount <= 0 || !IsPlayerConnected(to)) { SendClientMessage(playerid,0xAA3333AA,"Invalid parameters inserted."); return 1; } if (amount > GetPlayerMoney(from)) { SendClientMessage(playerid,0xAA3333AA,"You dont have enough money to do this."); return 1; } GivePlayerMoney(from, 0 - amount); GivePlayerMoney(to, amount); SendClientMessage(from,0xFFFF00AA,"You gave money away to someone"); SendClientMessage(to,0xFFFF00AA,"You got money from someone"); return 1; } return 1; }