Admin car
#1

I want huntley just for admins how can i do?
If is admin can drive it if no eject
Reply
#2

All huntleys ?
Reply
#3

Yes all huntleys
Reply
#4

pawn Код:
OnPlayerStateChange(playerid,oldstate,newstate)
{
    if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == 579) //Checking if the player is the driver of a Huntley
    {
        if(!IsPlayerAdmin(playerid)) //Checking if the player isn't an Admin ((Change it with your own variable))
        {
            RemovePlayerFromVehicle(playerid); //Removing the player from the vehicle
            SendClientMessage(playerid,0xFF0000FF,"Admins only!");
        }
    }
    return 1;
}
Reply
#5

pawn Код:
//public onplayerstatechange
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 579 && !IsPlayerAdmin(playerid))
    RemovePlayerFromVehicle(playerid);
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=288770

Check this tutorial
Reply
#7

Quote:
Originally Posted by AeroBlast
Посмотреть сообщение
pawn Код:
OnPlayerStateChange(playerid,oldstate,newstate)
{
    if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == 579) //Checking if the player is the driver of a Huntley
    {
        if(!IsPlayerAdmin(playerid)) //Checking if the player isn't an Admin ((Change it with your own variable))
        {
            RemovePlayerFromVehicle(playerid); //Removing the player from the vehicle
            SendClientMessage(playerid,0xFF0000FF,"Admins only!");
        }
    }
    return 1;
}
Are you ... not vehicle id, MODELID, dude...

pawn Код:
OnPlayerStateChange(playerid,oldstate,newstate)
{
    if(newstate == PLAYER_STATE_DRIVER && GetVehicleModelID(GetPlayerVehicleID(playerid)) == 579) //Checking if the player is the driver of a Huntley
    {
        if(!IsPlayerAdmin(playerid)) //Checking if the player isn't an Admin ((Change it with your own variable))
        {
            RemovePlayerFromVehicle(playerid); //Removing the player from the vehicle
            SendClientMessage(playerid,0xFF0000FF,"Admins only!");
            }
        }
    return 1;
}
Reply
#8

All huntleys only for admins this what i want
pawn Код:
D:\Jocuri\Gta san andreas\Admin.pwn(98) : error 017: undefined symbol "GetVehicleModelID"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && GetVehicleModelID(GetPlayerVehicleID(playerid)) == 579) //Checking if the player is the driver of a Huntley;
    {
         if(!IsPlayerAdmin(playerid)) //Checking if the player isn't an Admin ((Change it with your own variable))
         {
             RemovePlayerFromVehicle(playerid); //Removing the player from the vehicle
             SendClientMessage(playerid,0xFF0000FF,"Admins only!");
         }
    }
    return 1;
}
Reply
#9

error...
Reply
#10

Quote:
Originally Posted by viosteaua98
Посмотреть сообщение
All huntleys only for admins this what i want
pawn Код:
D:\Jocuri\Gta san andreas\Admin.pwn(98) : error 017: undefined symbol "GetVehicleModelID"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Its:

GetVehicleModel(GetPlayerVehicleID(playerid));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)