Errors on DM minigames
#1

hey guys ... im noob in scripting a lil bit. there is a problem could somebody help me?
i tried to add DM minigames to my server but it gives me error
idk how to fix them
this is what i scripted :
Код:
	COMMAND:dm1(playerid, params[])
	{
		if(GetPlayerMoney(playerid) <20000)
 		return CreateBox(playerid, "Error", "You dont have enough ~r~Money ~w~to play!");
  		GivePlayerMoney(playerid, -1000);
   		new Float:RandomSpawn[][5] =
		{
    		// Positions, (X, Y, Z and Facing Angle)
    		{3833.9055, 2267.9143, 13.9449, 115.8744},
    		{3830.4556, 2127.6658, 13.9449, 16.5468},
    		{3672.0271, 2123.6685, 13.9449, 350.5399},
    		{3669.6697, 2235.6228, 26.5391, 181.3383}
		};
		SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2],RandomSpawn[rand][3]);
		SetPlayerFacingAngle(playerid, RandomSpawn[rand][4]);
 		SetPlayerVirtualWorld(playerid, -1);
  		SetPlayerArmour(playerid, 100);
   		SetPlayerHealth(playerid, 100);
   		GivePlayerWeapon(playerid, 24, 99999);
    	DmMinigames[playerid] = 1;
    	return 1;
	}
	COMMAND:dm2(playerid, params[])
	{
		if(GetPlayerMoney(playerid) <20000)
 		return CreateBox(playerid, "Error", "You dont have enough ~r~Money ~w~to play!");
  		GivePlayerMoney(playerid, -1000);
   		new Float:RandomSpawn[][4] =
		{
    		// Positions, (X, Y, Z and Facing Angle)
    		{3666.7439, 1998.4478, 10.9645, 356.4698},
    		{3655.1938, 2010.4469, 18.9901, 329.5463},
    		{3676.5574, 2009.8387, 15.3662, 141.5679}
		};
		SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
		SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
 		SetPlayerVirtualWorld(playerid, -1);
  		SetPlayerArmour(playerid, 100);
   		SetPlayerHealth(playerid, 100);
   		GivePlayerWeapon(playerid, 24, 99999);
    	DmMinigames[playerid] = 1;
		return 1;
	}
	COMMAND:dm3(playerid, params[])
	{
		if(GetPlayerMoney(playerid) <20000)
 		return CreateBox(playerid, "Error", "You dont have enough ~r~Money ~w~to play!");
  		GivePlayerMoney(playerid, -1000);
   		new Float:RandomSpawn[][5] =
		{
    		// Positions, (X, Y, Z and Facing Angle)
    		{3659.9744, 1967.3319, 4.5251, 187.0017},
    		{3688.9653, 1966.5337, 4.5251, 169.1415},
    		{3687.9185, 1888.4196, 4.5251, 27.5135},
    		{3660.9814, 1887.0289, 4.5251, 95.1941}
		};
		SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2],RandomSpawn[rand][3]);
		SetPlayerFacingAngle(playerid, RandomSpawn[rand][4]);
 		SetPlayerVirtualWorld(playerid, -1);
  		SetPlayerArmour(playerid, 100);
   		SetPlayerHealth(playerid, 100);
   		GivePlayerWeapon(playerid, 24, 99999);
    	DmMinigames[playerid] = 1;
    	return 1;
	}
	COMMAND:dm4(playerid, params[])
	{
		if(GetPlayerMoney(playerid) <20000)
 		return CreateBox(playerid, "Error", "You dont have enough ~r~Money ~w~to play!");
  		GivePlayerMoney(playerid, -1000);
   		new Float:RandomSpawn[][4] =
		{
    		// Positions, (X, Y, Z and Facing Angle)
    		{3618.2708, 1703.6812, -33.6539, 352.9015},
    		{3633.0125, 1780.3070, -39.2375, 259.3823},
    		{3783.5818, 1814.3704, -39.2375, 129.9744}
		};
		SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
		SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
 		SetPlayerVirtualWorld(playerid, -1);
  		SetPlayerArmour(playerid, 100);
   		SetPlayerHealth(playerid, 100);
   		GivePlayerWeapon(playerid, 24, 99999);
    	DmMinigames[playerid] = 1;
    	return 1;
	}
	COMMAND:dm5(playerid, params[])
	{
		if(GetPlayerMoney(playerid) <20000)
 		return CreateBox(playerid, "Error", "You dont have enough ~r~Money ~w~to play!");
  		GivePlayerMoney(playerid, -1000);
   		new Float:RandomSpawn[][4] =
		{
    		// Positions, (X, Y, Z and Facing Angle)
    		{3592.3071, 1537.4119, 19.7287, 269.6989},
    		{3639.5667, 1504.7086, 21.0292, 357.4097},
    		{3628.6865, 1546.5759, 24.5461, 144.9911}
		};
		SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
		SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
 		SetPlayerVirtualWorld(playerid, -1);
  		SetPlayerArmour(playerid, 100);
   		SetPlayerHealth(playerid, 100);
   		GivePlayerWeapon(playerid, 24, 99999);
    	DmMinigames[playerid] = 1;
    	return 1;
	}
here are the errors:
Code:
Код:
D:\RGP 3.e\gamemodes\RGP.pwn(1821) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1822) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1842) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1843) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1864) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1865) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1885) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1886) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1906) : error 017: undefined symbol "rand"
D:\RGP 3.e\gamemodes\RGP.pwn(1907) : error 017: undefined symbol "rand"
edited ... that error fixed it gives me this error now
Reply


Messages In This Thread
Errors on DM minigames - by R4VER - 17.08.2012, 15:40
Re: Errors on DM minigames - by Avi57 - 17.08.2012, 15:42
Re: Errors on DM minigames - by R4VER - 17.08.2012, 15:46
Re: Errors on DM minigames - by [p3]pr0t0typ3 - 17.08.2012, 15:47
Re: Errors on DM minigames - by R4VER - 17.08.2012, 15:48
Re: Errors on DM minigames - by R4VER - 17.08.2012, 16:02
Re: Errors on DM minigames - by kbalor - 17.08.2012, 16:26
Re: Errors on DM minigames - by R4VER - 17.08.2012, 16:36
Re: Errors on DM minigames - by kbalor - 17.08.2012, 16:46
Re: Errors on DM minigames - by R4VER - 17.08.2012, 16:58

Forum Jump:


Users browsing this thread: 2 Guest(s)