Personal Vehicle. [Fixed, Mod delete please]
#1

Fixed.. please delete thread thx
Reply
#2

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

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

Got from this post...

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

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!
Reply
#5

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
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)