
|
Hello guys,
I need help with the cmd /car engine, I wanted to ask if someone can script it for me, im new with scripting ![]() I think it can help plugins mysql.dll streamer.dll Whirlpool.dll sscanf.dll nativechecker.dll |
|
I want, if you can to script that when im typing /car engine its will turn on the vehicle
when you typing again /car engine it'll turn off the vehicle engine understand? and one more thing, that hitman will type /mask their name will disappear, only for hitmans! THANKS! |
//place at the top of gamemode
enum vData
{
bool:Engine
}
new Vehicle_Data[MAX_VEHICLES][vData];
//Place in OnGameModeInit
for(new i=0; i < MAX_VEHICLES; i++) Vehicle_Data[i][Engine] = true;
//actual command used zcmd to make this :D
CMD:engine(playerid, params[])
{
SendClientMessageToAll(WHITE, "Command called!");
new VehID = GetPlayerVehicleID(playerid),
engine,
lights,
alarm,
doors,
bonnet,
boot,
objective;
GetVehicleParamsEx(VehID, engine, lights, alarm, doors, bonnet, boot, objective);
if(!Vehicle_Data[VehID][Engine])
{
SendClientMessageToAll(WHITE, "Command called! -- Engine is 1");
SetVehicleParamsEx(VehID, 1, lights, alarm, doors, bonnet, boot, objective);
SCM(playerid, GREEN, "Your engine has been turned on.");
Vehicle_Data[VehID][Engine] = true;
}
else
{
SendClientMessageToAll(WHITE, "Command called! -- Engine is 0");
SetVehicleParamsEx(VehID, 0, lights, alarm, doors, bonnet, boot, objective);
SCM(playerid, GREEN, "Your engine has been turned of.");
Vehicle_Data[VehID][Engine] = false;
}
return 1;
}
|
you could have searched before u ask anyways i got it from a topic credits goes to Duck4coder
PHP код:
|
|
C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(11) : error 017: undefined symbol "MAX_VEHICLES" C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(14) : error 010: invalid function or declaration C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(2461) : warning 219: local variable "engine" shadows a variable at a preceding level C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(247 : warning 219: local variable "engine" shadows a variable at a preceding levelC:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(2495) : warning 219: local variable "engine" shadows a variable at a preceding level C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(26151) : warning 219: local variable "engine" shadows a variable at a preceding level C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(26287) : warning 219: local variable "engine" shadows a variable at a preceding level C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(27001) : warning 217: loose indentation C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(27003) : warning 217: loose indentation C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(27360) : warning 219: local variable "engine" shadows a variable at a preceding level C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(2755 : warning 219: local variable "engine" shadows a variable at a preceding levelC:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(46691) : warning 219: local variable "engine" shadows a variable at a preceding level C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(47137) : warning 219: local variable "engine" shadows a variable at a preceding level C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(57302) : warning 219: local variable "engine" shadows a variable at a preceding level C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(60627) : warning 203: symbol is never used: "engine" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |

|
errors: C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(6) : error 074: #define pattern must start with an alphabetic character C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(26962) : warning 217: loose indentation C:\Documents and Settings\susu\Desktop\horizon\horizon\gamemodes\HR P_9.0.pwn(26964) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |