Delete vehicle on Disconnect [+REP]
#1

Hello,
Guys i have this car spawner, Thats in the /v [CarName] [Color1] [Color2] format. Now. Spawns and everything alright. But, I want the vehicle they created to delete when they disconnect. If seombody can help me here i will Rep.

Heres the script.
http://pastebin.com/uLsK3whJ
Reply
#2

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(PlayerInfo[playerid][pSpawnVehicle]) //If the player spawned a vehicle.
    {
        DestroyVehicle(PlayerInfo[playerid][pSpawnVehicle]); //destroy it.
    }
    return 1;
}
Reply
#3

That works. Now like. I just noticed. When my friend or somebody spawns lets say a elegy. Then another spawns a car after him. My friends car disappears. Is there a way to fix this? ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)