help me again!
#4

Код:
CMD:prize(playerid,params[])
{
	if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]:you are not rcon admin");
	new targetid,str[75],ammount,pname[MAX_PLAYER_NAME];
	if(sscanf(params,"ud",targetid,ammount)) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]:Usage(playerid)/[Prize Money]");
	if(playerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]:Player is not connected.");
	if(ammount < 1000000 || ammount > 3000000) return SendClientMessage(playerid,COLOR_ERROR,"Invalid ammount Range's Are 1million to 3million");
	GetPlayerName(targetid, pname, sizeof(pname));
	GivePlayerMoney(targetid, + ammount);
	format(str,sizeof(str), "You Have Recived (%d) prize money by a admin",ammount);
	SendClientMessage(playerid,COLOR_CYAN,str);
	format(str,sizeof(str),  "you have given %d prizemoney to %s(%i)",ammount, pname, targetid);
	SendClientMessage(targetid,COLOR_CYAN,str);
	return 1;
}
Try this and let me know how it turns out.
Reply


Messages In This Thread
help me again! - by ahameed4755 - 05.10.2015, 20:41
Re: help me again! - by Crystallize - 05.10.2015, 20:43
Re: help me again! - by ahameed4755 - 06.10.2015, 12:59
Re: help me again! - by Affan - 06.10.2015, 13:13
Re: help me again! - by Sjn - 06.10.2015, 15:28
Re: help me again! - by J0sh... - 06.10.2015, 15:46
Re: help me again! - by Affan - 06.10.2015, 17:32

Forum Jump:


Users browsing this thread: 2 Guest(s)