10.08.2010, 20:34
Hey,
So I have this teleport that puts on you in a NRG immediately. If someone falls down, he gets teleported away, but the NRG spawns at the starting location, so if 10 people come you'll soon have 10 vehicles on each other and lagging all.
I think that fixing is easy but do not know how to. What I would want is that once the player falls from the NRG, and he automatically teleports, the NRG should be destroyed.
So I have this teleport that puts on you in a NRG immediately. If someone falls down, he gets teleported away, but the NRG spawns at the starting location, so if 10 people come you'll soon have 10 vehicles on each other and lagging all.
pawn Код:
if(strcmp(cmdtext, "/wipeout", true) == 0)
{
if(IsInDM[playerid] ==1)
{
SendClientMessage(playerid,COLOR_RED,"If you want to teleport use /leavedm");
return 1;
}
nojump2[playerid] = 1;
leavenrgwipeout[playerid] = 1;
PutPlayerInVehicle(playerid, AddStaticVehicle(522, -933.0863,-320.8549,9.9999, 120, 2, 2), 0);
SetPlayerHealth(playerid, 100);
SetCameraBehindPlayer(playerid);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
new string[128], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[Teleport] %s has teleported to /wipeout - Win 20.000$ + 1 Score", playerName);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(ReceiveInfo[i] == true)
{
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
}
}
return 1;
}