#2

It is to simple. You have to write a command for this.

Add it to PUBLIC ONGAMEMODEINIT:
Код HTML:
CreateDynamicObject(19054, X, Y, Z - 0.4, 0.0, 0.0, A);
          CreateDynamic3DTextLabel("/getgift\nTo get your gift.",0x10F441AA,X, Y, Z+0.25,8.0);
Код HTML:
CMD:getgift(playerid, params[])
{
    if(TimeCMD[playerid] > gettime())
        return SendClientMessage(playerid, 0xFF0000FF, "You have reached the limit, try again after sometime!");

			if(IsPlayerInRangeOfPoint(playerid, 15.0, 1083.3048,-1796.6688,13.6722))
			{
			        TimeCMD[playerid] = 2 * 60 * 60 + gettime();
					new gift = random(7);
					switch (gift)
    				{
					case 1:
			        {
			            GivePlayerMoney(playerid, 10000);
			            SendClientMessage(playerid, COLOR_YELLOW, "You have won 10000$ enjoy!.");
			        }
			        case 2:
			        {
			            GivePlayerMoney(playerid, 200);
			            SendClientMessage(playerid, COLOR_YELLOW, "You have won 200$ enjoy!.");
			        }
			        case 3:
			        {
			            SetPlayerArmour(playerid, 100);
			            SendClientMessage(playerid, COLOR_YELLOW, "You have won 100 armour enjoy!.");
			        }
			        case 4:
			        {
			            SetPlayerHealth(playerid, 100);
			            SendClientMessage(playerid, COLOR_YELLOW, "You have won 100 HP enjoy!.");
			        }
			        case 5:
			        {
			            SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
			            SendClientMessage(playerid, COLOR_YELLOW, "You have won a free level up!.");
			        }
			        case 6:
			        {
			            SendClientMessage(playerid, COLOR_YELLOW, "Sorry, you got nothing try again!.");
			        }
			        }
					orejucate[playerid] = 0;
			}
			else
			{
			    CP[playerid] = 385;
				SCM(playerid,COLOR_WHITE, "You are not at gift location. Go to checkpoint.");
				SetPlayerCheckpoint(playerid, 1083.3048,-1796.6688,13.6722, 2);
			}
	return 1;
}
Go in game and save the city hall gift position with /save. Don't forget to replace 1083.3048,-1796.6688,13.6722 with your coordinates. Also X,Y,Z from the pickup/3dtext in ONGAMEMODEINIT.
Reply


Messages In This Thread
hmm - by LifeRah - 20.05.2016, 04:45
Re: hmm - by Nin9r - 20.05.2016, 09:02

Forum Jump:


Users browsing this thread: 2 Guest(s)