SA-MP Forums Archive
[FilterScript] Private car - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Private car (/showthread.php?tid=503644)



Private car - citromhun - 30.03.2014

Hi!

I wrote a script in a private vehicle boredom! Number of Rows: 21, Preparation time: about it. 1 minute, how is this: The vehicle chosen to work only with the designated player.

pawn Код:
#include <a_samp>
new pcar;

#define cordinate x,y,z,a
#define color1 colorid
#define color2 colorid

public OnFilterScriptInit()
{
        pcar = AddStaticVehicle(411, coordinate, color1, color2);
        return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
        if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == privi)
        {
                new name[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, sizeof(name));
                if(strcmp(name, "citromhun", false))
                {
                        RemovePlayerFromVehicle(playerid);
                        SendClientMessage(playerid, 0x281aeb, "This is not your vehicle to it: citrumhun vehicles");
                }
        }
        return 1;
}



Re: Private car - MBilal - 30.03.2014

Nice


Re: Private car - MORJAN1122 - 30.03.2014

Good


Re: Private car - Kathleen - 30.03.2014

Simpel but Nice :P