[Ajuda] Bloquear
#8

Quote:
Originally Posted by JPedro
Посмотреть сообщение
Й algo assim, eu fiz no onplayerstatechange, mas vocк pode fazer na callback OnPlayerEnterVehicle sу que se o jogador for teleportado/puxado pra dentro do trem sem fazer a animaзгo de entrar nгo vai ter a checagem, recomendo usar o onplayerstatechange

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER// Player entered a vehicle as a driver
    
{
        new 
vehicleid GetPlayerVehicleID(playerid);
        if(
IsPlayerInVehicle(playeridvehicleid) && GetVehicleModel(vehicleid) == id do trem)
        {
            if(
pInfo[playerid][pOrg] != id da org)
            {
                
SendClientMessage(playerid, -1"vc nao й da org e nao pode dirigir este veiculo");
                
RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return 
1;

Cara obrigado, ainda com esse cуdigo vc me deu uma ideia mt melhor rsrs, vlw.
Reply


Messages In This Thread
Bloquear - by FabioGTP - 23.09.2016, 19:30
Re: Bloquear - by LockedLucas - 23.09.2016, 19:33
Re: Bloquear - by FabioGTP - 23.09.2016, 19:38
Re: Bloquear - by Whoo - 23.09.2016, 19:40
Re: Bloquear - by FabioGTP - 23.09.2016, 19:43
Re: Bloquear - by JPedro - 23.09.2016, 19:46
Re: Bloquear - by Whoo - 23.09.2016, 19:50
Re: Bloquear - by FabioGTP - 23.09.2016, 19:51
Re: Bloquear - by JPedro - 23.09.2016, 19:55
Re: Bloquear - by FabioGTP - 23.09.2016, 20:05
Re: Bloquear - by JPedro - 23.09.2016, 20:08
Re: Bloquear - by Whoo - 23.09.2016, 20:22
Re: Bloquear - by JPedro - 23.09.2016, 20:27
Re: Bloquear - by Whoo - 23.09.2016, 20:46
Re: Bloquear - by JPedro - 23.09.2016, 20:55

Forum Jump:


Users browsing this thread: 1 Guest(s)