03.01.2016, 15:21
Hello,
I searched a lot but I couldn't find a converter from zcmd to strcp.
Could someone convert it for me?
I searched a lot but I couldn't find a converter from zcmd to strcp.
Could someone convert it for me?
PHP код:
CMD:transfer(playerid, params[]){
new id, amount, cash;
if(sscanf(params,"ui", id, amount))
return SendClientMessage(playerid, 0xCECECEFF, "CMD: /transfer [player] [amount]");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, 0xCECECEFF, "Player is not connected");
cash = GetPlayerMoney(playerid);
if(amount > cash)
return SendClientMessage(playerid, 0xCECECEFF, "You do not have that much!");
if(amount < 1)
return SendClientMessage(playerid, 0xCECECEFF, "You can not transfer funds under 1!");
GivePlayerMoney(playerid, -amount);
GivePlayerMoney(id, amount);
SendClientMessage(playerid, 0xCECECEFF, "You sent the money.");
SendClientMessage(id, 0xCECECEFF, "You got given money.");
return 1;
}