15.11.2013, 13:38
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new engine;
new vehicleid=GetPlayerVehicleID(playerid);
if(newkeys & KEY_NO)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
new lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 0)
{
SetVehicleParamsEx(vehicleid,1,0,0,0,0,0,0);
SendClientMessage(playerid,COL_GREEN,"The engine is turned on");// ERROR 1
}
if(engine == 1)
{
SetVehicleParamsEx(vehicleid,0,0,0,0,0,0,0);
SendClientMessage(playerid,COL_RED,"The engine is turned off"); // ERROR 2
}
}
}
}
return 1;
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(Engine[playerid]==0)
{
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COL_GREEN,"Press N to turn engine on/off"); // ERROR 3
Engine[playerid] = 1;
}
}
}
if(newstate==PLAYER_STATE_ONFOOT)
{
Engine[playerid]=0;
}
return 1;
}
pawn Код:
new Engine[MAX_PLAYERS];
Код:
C:\Users\LG\Desktop\Mustafa\LV RP\gamemodes\RPLV.pwn(160) : error 035: argument type mismatch (argument 2) C:\Users\LG\Desktop\Mustafa\LV RP\gamemodes\RPLV.pwn(263) : error 035: argument type mismatch (argument 2) C:\Users\LG\Desktop\Mustafa\LV RP\gamemodes\RPLV.pwn(269) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.