Command Timer + Random Prize [+REP]
#8

Код:
CMD:getgift(playerid, params[]) // in your commands
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	{
		new currenttime = gettime();
		if(currenttime < (giftCooldown[playerid] + 6480)) return SendClientMessage(playerid, COLOR_GREY, "Wait before using the command again");
		if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1022.8253, -1853.5532, 13.5724)) return SendClientMessage(playerid, COLOR_GREY, "You are not at /getgift location.");
		SCM(playerid,COLOR_WHITE,"{FFFF00}You received 5000$ as a Christmas Gift.");
		
		new moneyToGive, string[88];
		moneyToGive = randomEx(1000, 10000);
		GivePlayerCash(playerid, moneyToGive);
		format(string, sizeof(string), "{B7B7B7}[SERVER] {FFFFFF}You received %i as gift, merry christmas", moneyToGive);
		SendClientMessage(playerid, -1, string);
		
		Update(playerid, pCashx);
		giftCooldown[playerid] = gettime();
	}
	return 1;
}
Reply


Messages In This Thread
Command Timer + Random Prize [+REP] - by EgyptForLife - 27.12.2015, 11:43
Re: Command Timer + Random Prize [+REP] - by SecretBoss - 27.12.2015, 11:51
Re: Command Timer + Random Prize [+REP] - by SilverStand - 27.12.2015, 11:59
Re: Command Timer + Random Prize [+REP] - by SecretBoss - 27.12.2015, 12:04
Re: Command Timer + Random Prize [+REP] - by EgyptForLife - 27.12.2015, 12:05
Re: Command Timer + Random Prize [+REP] - by SecretBoss - 27.12.2015, 12:10
Re: Command Timer + Random Prize [+REP] - by EgyptForLife - 27.12.2015, 12:17
Re: Command Timer + Random Prize [+REP] - by SecretBoss - 27.12.2015, 12:20
Re: Command Timer + Random Prize [+REP] - by iKarim - 27.12.2015, 12:22
Re: Command Timer + Random Prize [+REP] - by EgyptForLife - 27.12.2015, 12:25

Forum Jump:


Users browsing this thread: 1 Guest(s)