public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATER_DRIVER)) //Checks if hes new state is driver
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 425 || model == 520 || model == 432) //Checks if the modelid is hunter, hydra & tank
{
SendClientMessage(playerid, 0xFFFFFFAA, "You are not allowed to drive this vehicle!"); //Just send a message to inform him about he is not allowed to drive this vehicle
RemovePlayerFromVehicle(playerid); //Removed the player from the vehicle
}
}
return 1;
}
C:\DOCUME~1\Prabhat\Desktop\WORLDS~1.5\FILTER~1\LuxAdmin.pwn(8395) : error 017: undefined symbol "PLAYER_STATER_DRIVER" C:\DOCUME~1\Prabhat\Desktop\WORLDS~1.5\FILTER~1\LuxAdmin.pwn(8395) : error 029: invalid expression, assumed zero
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER) //Checks if hes new state is driver
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 425 || model == 520 || model == 432) //Checks if the modelid is hunter, hydra & tank
{
SendClientMessage(playerid, 0xFFFFFFAA, "You are not allowed to drive this vehicle!"); //Just send a message to inform him about he is not allowed to drive this vehicle
RemovePlayerFromVehicle(playerid); //Removed the player from the vehicle
}
}
return 1;
}
if (AccInfo[playerid][pVip] < 1 || AccInfo[playerid][Level] < 5 )
{
if(newstate == PLAYER_STATE_DRIVER) //Checks if hes new state is driver
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 425 || model == 520 || model == 432) //Checks if the modelid is hunter, hydra & tank
{
SendClientMessage(playerid, 0xFFFFFFAA, "This vehicle is only for VIPs!"); //Just send a message to inform him about he is not allowed to drive this vehicle
RemovePlayerFromVehicle(playerid); //Removed the player from the vehicle
}
}
if(AccInfo[playerid][pVip] < 1 || AccInfo[playerid][Level] < 5 )
{
if(newstate == PLAYER_STATE_DRIVER) //Checks if hes new state is driver
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 425 || model == 520 || model == 432) //Checks if the modelid is hunter, hydra & tank
{
SendClientMessage(playerid, 0xFFFFFFAA, "This vehicle is only for VIPs!"); //Just send a message to inform him about he is not allowed to drive this vehicle
RemovePlayerFromVehicle(playerid); //Removed the player from the vehicle
}
}
if (AccInfo[playerid][pVip] < 1 || AccInfo[playerid][Level] < 5 )
if(accinfo[playerid][pVip] is LESS THAN 1 || AccInfo[playerid][Level] LESS THAN 5)
if (AccInfo[playerid][pVip] >= 1 || AccInfo[playerid][Level] >= 5 )
{
if(newstate == PLAYER_STATE_DRIVER) //Checks if hes new state is driver
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 425 || model == 520 || model == 432) //Checks if the modelid is hunter, hydra & tank
{
SendClientMessage(playerid, 0xFFFFFFAA, "This vehicle is only for VIPs!"); //Just send a message to inform him about he is not allowed to drive this vehicle
RemovePlayerFromVehicle(playerid); //Removed the player from the vehicle
}
}
if (AccInfo[playerid][pVip] < 1 || AccInfo[playerid][Level] < 5 )
if ( AccInfo[ playerid ][ pVip ] >= 1 || AccInfo[ playerid ][ Level ] > 0 )
You're checking if the Player's VIP level is lower than 1.
No idea too, why you don't want admin level 5 or higher cannot use it. Replace : pawn Код:
pawn Код:
|