04.04.2012, 14:04
Hello, I have a Container Ship DM which is made using MTA.
I am using the streamer plugin, so when people teleport here, they sometimes get spawned under the ship as it's not fully loaded.
So how can I make the TogglePlayerControllable last for 1-2 seconds just to give the objects time to load and so that the players do not spawn under the ship?
Here's my code.
Thanks.
I am using the streamer plugin, so when people teleport here, they sometimes get spawned under the ship as it's not fully loaded.
So how can I make the TogglePlayerControllable last for 1-2 seconds just to give the objects time to load and so that the players do not spawn under the ship?
Here's my code.
pawn Код:
if (strcmp("/dm2", cmdtext, true, 10) == 0)
{
new var2[24];
new var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has joined the Container Ship DM, Type /dm2 to join", var2);
SendClientMessageToAll(COLOR_RED, var4);
new c = random(5);
if (c == 0){
SetPlayerPos(playerid, -2145.8801,1848.5684,5.4404);}
else if (c == 1){
SetPlayerPos(playerid, -2144.4109,1843.4076,5.4328);}
else if (c == 2){
SetPlayerPos(playerid, -2144.8052,1856.6118,5.4328);}
else if (c == 3){
SetPlayerPos(playerid, -2214.0801,1843.0238,5.4404);}
else if (c == 4){
SetPlayerPos(playerid, -2209.9526,1849.9366,5.4328);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerVirtualWorld (playerid, 0);
return 1;
}