Hitmen commands?
#6

If you want it without a variable you can use this:
Код:
if(!strcmp(cmd,"/givehit",true))
	{
	    new
	        ID[256],
	        Amount[256]
	        ;
	    ID = strtok(cmdtext, idx);
	    Amount = strtok(cmdtext, idx);
		if(!strlen(ID) && !strlen(Amount) && !IsPlayerConnected(strval(ID))) return SendClientMessage(playerid, -1, !IsPlayerConnected(strval(ID))? ("This player not connected") : ("You need to write playerid and amount."));
		if(GetPlayerMoney(playerid) < strval(Amount)) return SendClientMessage(playerid, -1, "Invalid amount.");
		return GivePlayerMoney(playerid, -strval(Amount)), GivePlayerMoney(strval(ID), strval(Amount));
	}
Reply


Messages In This Thread
Hitmen commands? - by BleverCastard - 03.05.2012, 14:13
Re: Hitmen commands? - by Accord - 03.05.2012, 14:16
Re: Hitmen commands? - by BleverCastard - 03.05.2012, 14:17
Re: Hitmen commands? - by dannyk0ed - 03.05.2012, 14:18
Re: Hitmen commands? - by BleverCastard - 03.05.2012, 14:20
Re: Hitmen commands? - by Accord - 03.05.2012, 14:24
Re: Hitmen commands? - by dannyk0ed - 03.05.2012, 14:26
Re: Hitmen commands? - by BleverCastard - 03.05.2012, 14:28
Re: Hitmen commands? - by Accord - 03.05.2012, 14:34
Re: Hitmen commands? - by BleverCastard - 03.05.2012, 14:35

Forum Jump:


Users browsing this thread: 1 Guest(s)