I need help -
gonzalo120 - 01.11.2013
Ok, i have a GM ok, And i need help, because, when press the number 2 of keyboard, in a car, The engine Stop or start...
When im in a towcar, and wants to tow a car, press 2 and engine go OFF, Same like airplane to put the wheels inside...
I want to delete it, about press 2 to engine OFF..
if(strcmp(cmd,"/engine",true) == 0)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vehid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
if(vehid == 481 || vehid == 509 || vehid == 510)
return 1;
GetVehicleParamsEx(vehid,engine,lights,alarm,doors ,bonnet,boot,objective);
if(engine<=0)
{
GameTextForPlayer(playerid, "~g~Starting the engine...", 1200, 1);
SetTimerEx("StartEngine", 1500, 0, "ii", playerid, vehid);
}
else
{
GameTextForPlayer(playerid, "~r~Stopping the engine...", 1200, 1);
SetTimerEx("StopEngine", 1500, 0, "ii", playerid, vehid);
}
I didnt found it in GM...
Re: I need help -
]Rafaellos[ - 01.11.2013
Check for
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
In you'r gamemode.
Re: I need help -
DanishHaq - 01.11.2013
It's under OnPlayerKeyStateChange for newkeys == KEY_SUBMISSION.
Edit: Above was faster, I was waiting for 240 seconds to pass.
Respuesta: Re: I need help -
gonzalo120 - 01.11.2013
Quote:
Originally Posted by ]Rafaellos[
Check for
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
In you'r gamemode.
|
And i need to delete it or something?
Re: I need help -
SAMProductions - 01.11.2013
If you want so, You can delete it, so the Engine thingy will be gone.
Re: I need help -
Konstantinos - 01.11.2013
If you want to remove it (turning the engine off with 2), then yes. You need to remove the correct part though, not the whole callback.
However, you can make exceptions. What do I mean by that? Using the 2 button normally to turn the engine off but if the modelid is the towcar or a airplane which uses 2 to make the wheels up or the one which uses red smoke, do nothing!
Respuesta: Re: I need help -
gonzalo120 - 01.11.2013
Quote:
Originally Posted by Konstantinos
If you want to remove it (turning the engine off with 2), then yes. You need to remove the correct part though, not the whole callback.
However, you can make exceptions. What do I mean by that? Using the 2 button normally to turn the engine off but if the modelid is the towcar or a airplane which uses 2 to make the wheels up or the one which uses red smoke, do nothing!
|
I want ot remove that... the button 2 to engine OFF or ON, Only that
Respuesta: Re: I need help -
gonzalo120 - 01.11.2013
Quote:
Originally Posted by SAMProductions
If you want so, You can delete it, so the Engine thingy will be gone.
|
Just the engine OFF with the button 2, only...
Re: I need help -
SAMProductions - 01.11.2013
Look for "
if(newkeys & KEY_SUBMISSION)" or "
if(PRESSED(KEY_SUBMISSION) && IsPlayerInAnyVehicle (playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER )" and Delete its Code, Don't delete the whole Code :P.
Respuesta: Re: I need help -
gonzalo120 - 01.11.2013
Quote:
Originally Posted by SAMProductions
Look for "if(newkeys & KEY_SUBMISSION)" or "if(PRESSED(KEY_SUBMISSION) && IsPlayerInAnyVehicle (playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER )" and Delete its Code, Don't delete the whole Code :P.
|
if(PRESSED(KEY_SUBMISSION))
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vehid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
if(vehid == 481 || vehid == 509 || vehid == 510)
return 1;
GetVehicleParamsEx(vehid,engine,lights,alarm,doors ,bonnet,boot,objective);
if(engine<=0)
{
GameTextForPlayer(playerid, "~g~Starting the engine...", 1200, 1);
SetTimerEx("StartEngine", 1500, 0, "ii", playerid, vehid);
}
else
{
GameTextForPlayer(playerid, "~r~Stopping the engine...", 1200, 1);
SetTimerEx("StopEngine", 1500, 0, "ii", playerid, vehid);
}
??