Present system
#9

Okay good it worked, now I need help with the /open cmd for the present.... how do i set it so you got to be near the present to type /open?

cmd:
Код:
CMD:open(playerid, params[])
{
	new string[100], GiftBox1, GiftBox2, GiftBox3, GiftBox4, GiftBox5;
    /*new File:presents=fopen("presents.cfg", io_read);
	fclose(presents);
	if(IsPlayerInRangeOfPoint(playerid, 10.0, 23.213,2442.2424,242.214))
	{
		SendClientMessage(playerid, COLOR_GREY, "You're not in range of any Presents at the moment.");
		return 1;
	}*/
	if(Gift1 == 1)
	{
	    format(string, sizeof(string), "Congrats you were givin $10,000 from this package.");
        SendClientMessage(playerid, COLOR_WHITE, string);
		GiveDodMoney(playerid, 10000); // This is just a test, you can change it later.
		DestroyDynamicObject(GiftBox1);
		Gift1 =0;
		return 1;
	}
	if(Gift2 == 1)
	{
 		format(string, sizeof(string), "Congrats you were givin $5,000 from this package.");
        SendClientMessage(playerid, COLOR_WHITE, string);
		GiveDodMoney(playerid, 5000); // This is just a test, you can change it later.
		DestroyDynamicObject(GiftBox2);
		Gift2 =0;
		return 1;
	}
	if(Gift3 == 1)
	{
 		format(string, sizeof(string), "Congrats you were givin $11,000 from this package.");
        SendClientMessage(playerid, COLOR_WHITE, string);
		GiveDodMoney(playerid, 11000); // This is just a test, you can change it later.
		DestroyDynamicObject(GiftBox3);
		Gift3 =0;
		return 1;
	}
	if(Gift4 == 1)
	{
 		format(string, sizeof(string), "Congrats you were givin $12,000 from this package.");
        SendClientMessage(playerid, COLOR_WHITE, string);
		GiveDodMoney(playerid, 12000); // This is just a test, you can change it later.
		DestroyDynamicObject(GiftBox4);
		Gift4 =0;
		return 1;
	}
	if(Gift5 == 1)
	{
 		format(string, sizeof(string), "Congrats you were givin $19,000 from this package.");
        SendClientMessage(playerid, COLOR_WHITE, string);
		GiveDodMoney(playerid, 19000); // This is just a test, you can change it later.
		DestroyDynamicObject(GiftBox5);
		Gift5 =0;
		return 1;
	}
	return 1;
}
Reply


Messages In This Thread
Present system - by JacobSanchez - 15.12.2013, 16:40
Re: Present system - by JacobSanchez - 15.12.2013, 23:21
Re: Present system - by Vince - 15.12.2013, 23:41
Re: Present system - by JacobSanchez - 15.12.2013, 23:45
Re: Present system - by JacobSanchez - 16.12.2013, 22:11
Re: Present system - by Vince - 16.12.2013, 22:55
Re: Present system - by Dokins - 16.12.2013, 23:21
Re: Present system - by JacobSanchez - 16.12.2013, 23:38
Re: Present system - by JacobSanchez - 16.12.2013, 23:50
Re: Present system - by Dokins - 17.12.2013, 00:03

Forum Jump:


Users browsing this thread: 4 Guest(s)