Buying ammo. (Giving Credits to Helpers!)
#5

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp(cmd, "/buygrenades", true) == 0)
	{
	new
	tmp[20],
	amount;
	tmp = strtok(cmdtext, index);
	if (strlen(tmp))
	{
	amount = strval(tmp);
	if (IsPlayerConnected(amount))
	{
	GivePlayerWeapon(playerid,16,amount");
	GivePlayerMoney(playerid,-amount*1000)
	}
	else
	{
	SendClientMessage(playerid, 0xFF0000AA, "Amount is too hight");
	}
	}
	else
	{
	SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/buygrenades <amount>\"");
	}
	return 1;
	}
	return 0;
}
Not tested...
Reply


Messages In This Thread
Buying ammo. (Giving Credits to Helpers!) - by Sal_Kings - 07.08.2009, 10:46
Re: Buying ammo. (Giving Credits to Helpers!) - by kc - 07.08.2009, 10:52
Re: Buying ammo. (Giving Credits to Helpers!) - by Sal_Kings - 07.08.2009, 10:56
Re: Buying ammo. (Giving Credits to Helpers!) - by Sal_Kings - 07.08.2009, 11:00
Re: Buying ammo. (Giving Credits to Helpers!) - by xCoder - 07.08.2009, 11:25
Re: Buying ammo. (Giving Credits to Helpers!) - by Chrham_2 - 07.08.2009, 13:23

Forum Jump:


Users browsing this thread: 1 Guest(s)