Looking for help with a gift command.
#1

This guy gave me an idea about making a gift system. But I tweeked it a little. When I spawn a gift box by an Admin. I want other players to type /getgift to get some random gift I make. How would I make the command for this?

My giftbox spawning:
Код:
CMD:xmas(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GREY,"You are not authorized to use that command!");
	{
		new Float:x,Float:y,Float:z;
		GetPlayerPos(playerid,x,y,z);
		CreateObject(19054,x+2.0,y,z,0.0,1,0,300);
		SendClientMessageToAll(COLOR_RED, "An Admin has set a gift box!");
		return 1;
	}
}
Reply
#2

Save object to variable index and then check is player near object and give them their gift. You should also make an boolean var for check is gift party started or not.
Reply
#3

I cant seem to get it to work...An example please?
Reply
#4

its been 24 hours...Can someone give me an example of the command I could use?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)