whats wrong with this cmd
#4

Quote:
Originally Posted by Kitten
Посмотреть сообщение
i don't actually seen anything wrong in the server but i would actually use this code.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(gTeam[playerid] == TEAM_ZOMBIE) {
        if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
        {
            new vehicleid = GetPlayerVehicleID(playerid);
            if(GetVehicleModel(vehicleid) == CARID)
            {
                SetPlayerHealth(playerid, 0);
                DestroyVehicle(vehicleid);
            }
        }
    }
    return 1;
}
He's ejecting the player, not killing and destroying the vehicle....

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(gTeam[playerid] == TEAM_ZOMBIE)
    {
        SendClientMessage(playerid,ADMIN_RED,"Error: Zombies cant drive!!");
        ClearAnimations(playerid);
        return 1;
    }
}
OnPlayerEnterVehicle is called as soon the player presses F near a vehicle. So if you use ClearAnimations, it will NEVER let him enter.
Reply


Messages In This Thread
whats wrong with this cmd - by best_killa - 05.08.2011, 04:16
Re: whats wrong with this cmd - by Kitten - 05.08.2011, 07:46
Re: whats wrong with this cmd - by best_killa - 05.08.2011, 22:28
Re: whats wrong with this cmd - by Emmet_ - 05.08.2011, 22:45
Re: whats wrong with this cmd - by Adil - 05.08.2011, 22:53
Re: whats wrong with this cmd - by best_killa - 05.08.2011, 23:39
Re: whats wrong with this cmd - by windartist - 06.08.2011, 01:46
Re: whats wrong with this cmd - by suhrab_mujeeb - 06.08.2011, 09:47

Forum Jump:


Users browsing this thread: 4 Guest(s)