SA-MP Forums Archive
how to reserve a car for a faction? - 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: how to reserve a car for a faction? (/showthread.php?tid=298705)



how to reserve a car for a faction? - Gooday - 22.11.2011

Hi all, how i can add a towtruck just for the player with the towtrucker skins?

ps: i'll make a checkpoint when u go in it:

Type /towjob for become a towtrucker and than give the towtrucker SKIN...please i cant find how


Re: how to reserve a car for a faction? - SmiT - 22.11.2011

pawn Код:
new
    towtruck
;

towtruck = AddStaticVehicle( ... ); /* gamemodeinit / filterscriptinit */


public OnPlayerStateChange( playerid, newstate, oldstate )
{
    if ( newstate == PLAYER_STATE_DRIVER )
    {
        if ( GetPlayerVehicleID( playerid ) == towtruck && GetPlayerSkin( playerid ) != 23 )
        { /* if player is in the towtruck and his skin is NOT equal to 23 */
            RemovePlayerFromVehicle( playerid );
            SendClientMessage( playerid, -1, #You dont have towtruck skin );
        }
    }
    return ( 1 );
}
I added skin ID 23 as an example.


Re: how to reserve a car for a faction? - Gooday - 22.11.2011

Thank! how i can make a checkpoint with infos?