Randomish Teleport?
#5

This Works Fine,

Код:
new Float:RandomSpawn[][4] =
{
    {283.3869, 1805.9667, 17.6406},
    {217.2084, 1852.7458, 12.7484},
    {248.5981, 1858.0115, 14.0840}
};

public OnPlayerCommandText(playerid, cmdtext[])
	{
	if (strcmp("/dm", cmdtext, true, 10) == 0)
	{
		new rand = random(sizeof(RandomSpawn));
    	SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
		GivePlayerWeapon(playerid, 31, 99999);
		GivePlayerWeapon(playerid, 26, 99999);
		GivePlayerWeapon(playerid, 34, 99999);
		SetTimer("time", 900, 1);
		new name[MAX_PLAYER_NAME], string[44];
    	GetPlayerName(playerid, name, sizeof(name));
    	format(string, sizeof(string), "%s has joined the DM!",name);
    	SendClientMessageToAll(0xFFFF00AA, string);
    	GameTextForPlayer(playerid, "~y~Welcome to the ~r~DM ~y~zone! Type: /leavedm to leave the DM!", 3000, 3);
		return 1;
 	}
	if (strcmp(cmdtext, "/leavedm", true) == 0) {
 {
 		new name[MAX_PLAYER_NAME], string[44];
    	GetPlayerName(playerid, name, sizeof(name));
    	format(string, sizeof(string), "%s has Left the DM!",name);
    	SendClientMessageToAll(0xFFFF00AA, string);
 		SetPlayerPos(playerid,2799.8398,-2547.7798,13.6282);
 		}
		return 1;
Reply


Messages In This Thread
Randomish Teleport? - by HayZatic - 05.07.2011, 18:42
Re: Randomish Teleport? - by [MG]Dimi - 05.07.2011, 19:07
Re: Randomish Teleport? - by HayZatic - 05.07.2011, 19:11
Re: Randomish Teleport? - by TheGarfield - 05.07.2011, 19:18
Re: Randomish Teleport? - by HayZatic - 05.07.2011, 20:04
Re: Randomish Teleport? - by [MG]Dimi - 05.07.2011, 20:19

Forum Jump:


Users browsing this thread: 2 Guest(s)