I need help
#1

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...
Reply
#2

Check for
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
In you'r gamemode.
Reply
#3

It's under OnPlayerKeyStateChange for newkeys == KEY_SUBMISSION.

Edit: Above was faster, I was waiting for 240 seconds to pass.
Reply
#4

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?
Reply
#5

If you want so, You can delete it, so the Engine thingy will be gone.
Reply
#6

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!
Reply
#7

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
Reply
#8

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...
Reply
#9

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.
Reply
#10

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);
}


??
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)