29.02.2016, 18:24
(
Последний раз редактировалось Shaheen; 01.03.2016 в 03:05.
)
Hello
i Need a help for scripting /pay money i had tried many things but cant fix it
Error
cmd_pay is never used
Hope you guys can help me
Thnx in advance
i Need a help for scripting /pay money i had tried many things but cant fix it
Код:
dcmd_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;
}
cmd_pay is never used Hope you guys can help me
Thnx in advance

