12.06.2013, 17:24
Hello,
I have this script :-
Errors :-
I Want that if Pilot and Mechanic < 1 then player cant enter.
I have this script :-
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(vehicleid) == 432)
{
if(class[playerid][Mechanic] < 1) return RemovePlayerFromVehicle(playerid);
}
if(GetVehicleModel(vehicleid) == 520 && GetVehicleModel(vehicleid) == 425)
{
if(class[playerid][Pilot] < 1) return RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
pawn Код:
E:\Scripter\filterscripts\tdm.pwn(289) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
E:\Scripter\filterscripts\tdm.pwn(290) : error 017: undefined symbol "newstate"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.