23.03.2012, 20:19
Hello, sometimes when I type this teleport in, it will sometimes take me to an open grey area like this.
[/QUOTE]
So I sometimes have to type the command in 3-4 times to teleport me to the correct place.
Here's the code.
Thanks.
![](/imageshack/img812/1341/samp058gm.png)
So I sometimes have to type the command in 3-4 times to teleport me to the correct place.
Here's the code.
pawn Код:
if (strcmp("/jdm", cmdtext, true, 10) == 0)
{
new var2[24], var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has joined Jefferson Motel DM, Type /jdm to join", var2);
SendClientMessageToAll(COLOR_RED, var4);
new c = random(6);
if(gTeam[playerid] == 1) // Allies
{
if (c == 0) SetPlayerPos(playerid, 2220.8215,-1149.4452,1025.7969);
else if (c == 1) SetPlayerPos(playerid, 2221.6023,-1139.9663,1027.7969);
else if (c == 2) SetPlayerPos(playerid, 2227.1799,-1141.6085,1029.7969);
else if (c == 3) SetPlayerPos(playerid, 2232.9680,-1150.1281,1029.7969);
}
else
{
if (c == 3) SetPlayerPos(playerid, 2241.6462,-1192.2533,1029.7969);
else if (c == 4) SetPlayerPos(playerid, 2236.2317,-1188.6218,1029.8043);
else if (c == 5) SetPlayerPos(playerid, 2245.2378,-1186.0424,1029.8043);
}
SetPlayerInterior(playerid, 15);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 31, 1200);
GivePlayerWeapon(playerid, 34, 1337);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 26, 500);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}