SA-MP Forums Archive
Help for command to respawn only 1 veh - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help for command to respawn only 1 veh (/showthread.php?tid=293161)



Help for command to respawn only 1 veh - Niko_Oconner - 27.10.2011

Hey, i want to create a command for respawn a only vehicle and not all cars...
Please help me..
Thanks


Re: Help for command to respawn only 1 veh - SmiT - 27.10.2011

Using y_commands:

pawn Код:
YCMD:respawnveh(playerid, params[], help)
{
    if ( help ) return SendClientMessage( playerid, -1, #Respawns a car );
    if ( isnull ( params ) )
    {
        SetVehicleToRespawn( GetPlayerVehicleID ( playerid  ) );
        SendClientMessage( playerid, -1, #Vehicle respawned );
    }
    return true;
}