Money scripting
#4

On "OnPlayerSpawn":

Quote:

GivePlayerMoney(playerid,5000);

Код:
COMMAND:pay(playerid,params[])
{
new id, betrag;
if(sscanf(params,"dd",id,betrag)) return NoSuccess(playerid,"Usage /pay id amount");
if(!IsPlayerConnected(id)) return NoSuccess(playerid,"player is not connected!");
if(betrag < 0) return NoSuccess(playerid,"Amount cannot be under 0!");
if(GetPlayerMoney(playerid) < betrag) return NoSuccess(playerid,"dont have so much money!");

GivePlayerMoney(playerid,-betrag);
GivePlayerMoney(id,betrag);
return 1;
}
Reply


Messages In This Thread
Money scripting - by SonOussi - 21.01.2013, 18:01
Re: Money scripting - by SonOussi - 21.01.2013, 18:10
Re: Money scripting - by [XST]O_x - 21.01.2013, 18:11
AW: Money scripting - by Blackazur - 21.01.2013, 18:11
Re: Money scripting - by SonOussi - 21.01.2013, 18:15
AW: Money scripting - by Blackazur - 21.01.2013, 18:17
Re: Money scripting - by SonOussi - 21.01.2013, 18:20
AW: Money scripting - by Blackazur - 21.01.2013, 18:22
Re: Money scripting - by SonOussi - 21.01.2013, 18:23
AW: Money scripting - by Blackazur - 21.01.2013, 18:25

Forum Jump:


Users browsing this thread: 3 Guest(s)