27.07.2012, 10:57
Who can help me with this
help with this command to can work in Range 5 metre's
need for RP
PHP код:
CMD:pay(playerid, params[])
{
new otherid, cash;
if (sscanf(params, "dd", otherid, cash)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /pay [ID] [Cash]");
else
{
if(GetPlayerMoney(playerid) > cash) SendClientMessage(playerid, COLOR_RED, "You don't have that much!");
else if(!IsPlayerConnected(otherid)) SendClientMessage(playerid, COLOR_RED, "That PlayerID is not connected!");
else if(otherid == playerid) SendClientMessage(playerid, COLOR_RED, "It is pointless to pay yourself..");
else
{
GivePlayerMoney(playerid, -cash);
GivePlayerMoney(otherid, cash);
}
}
return 1;
}
need for RP