SA-MP Forums Archive
Personal Vehicle. [Fixed, Mod delete please] - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Personal Vehicle. [Fixed, Mod delete please] (/showthread.php?tid=113817)



Personal Vehicle. [Fixed, Mod delete please] - DiddyBop - 16.12.2009

Fixed.. please delete thread thx



Re: Personal Vehicle. - BP13 - 16.12.2009

How did you even get that on your server. It doesn't compile properly.


Re: Personal Vehicle. - DiddyBop - 16.12.2009

idk.. compiles without errors for me.....

Got from this post...

http://forum.sa-mp.com/index.php?top...;boardseen#new


Re: Personal Vehicle. - Djiango - 16.12.2009

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new PlayerName[24];//
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));//Moved these two, so it only gets called when a player changes to driver!
        new Vehicle = GetPlayerVehicleID(playerid);
        if(Vehicle == admcar[0] || Vehicle == admcar[1] || Vehicle == admcar[2] || Vehicle == admcar[3])//You need to check with the "Vehicle" variable in each case!
        {
            if(strcmp(PlayerName,"[SP]LilGunna",true))//EDIT2: Deleted the "!"
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, 0xFB0000FF, "Get the FUCK out of LilGunna's car!");
            }
        }
    }
    return 1;
}
Edit: A space too much!
Edit2: Changes to the strcmp line!


Re: Personal Vehicle. - DiddyBop - 16.12.2009

Doesn't work ....


Can't i just stop the player from entering the vehicle before they event initiate the animation?


this is so confusing..

The way i had it worked, but did it for all cars.

Now the way i got it, doesnt work period.. :S.


Nvm it works, But i want it to let lilgunna in the car only, Not kick him... but keep others out.


Edit again: I added a "else" in and got it.. thx for the main part tho


Re: Personal Vehicle. [Fixed, Mod delete please] - Niixie - 16.12.2009

Please people, DONT DELETE YOUR POSTS WHEN YOUR PROBLEM IS FIXED! Other people could use this if they have the same kinda problem