19.10.2011, 14:49
I want huntley just for admins how can i do?
If is admin can drive it if no eject
If is admin can drive it if no eject
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;
}
//public onplayerstatechange
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 579 && !IsPlayerAdmin(playerid))
RemovePlayerFromVehicle(playerid);
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;
}
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.
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;
}
All huntleys only for admins this what i want
pawn Код:
|