Lock cars for team.
#1

http://pastebin.com/nmvTcxX8
Hi guys, I have a little problem. The code seems like 100% right but still I can take my own team cars and this is annoying me cos other players are taking our base cars to enemy and they would gain point like that. So guys, how can it be fixed? Thank you!
Reply
#2

Tere Olari. Why won't you just kick the player out of the car when he enter it? Something like this:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(gCars[vehicleid][CarTeam] == gPlayer[playerid][Team])
        {
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
Reply
#3

Ok thank you!
Reply
#4

Try looking Rivershell gamemode.
It has some example, one of them is Locking vehicle for other team.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)