car help
#1

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

Quote:
Originally Posted by RayDwayne
Посмотреть сообщение
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
so wht you want the cmd to do?
Reply
#3

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

use the search page or use wiki and its either .
new vehicleid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot,objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective)
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot ,objective);

or you can use setvehicleparamsforplayer search ****** ****** is your best friend not when it comes to phones tho they suck hahah
Reply
#5

Quote:
Originally Posted by RayDwayne
Посмотреть сообщение
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!
you could have searched before u ask anyways i got it from a topic credits goes to Duck4coder
PHP код:
//place at the top of gamemode
enum vData
{
   
bool:Engine
}
new 
Vehicle_Data[MAX_VEHICLES][vData];
//Place in OnGameModeInit
for(new i=0MAX_VEHICLESi++) Vehicle_Data[i][Engine] = true;
//actual command used zcmd to make this :D
CMD:engine(playeridparams[])
{
    
SendClientMessageToAll(WHITE"Command called!");
    new 
VehID GetPlayerVehicleID(playerid),
        
engine,
        
lights,
        
alarm,
        
doors,
        
bonnet,
        
boot,
        
objective;
 
    
GetVehicleParamsEx(VehIDenginelightsalarmdoorsbonnetbootobjective);
    if(!
Vehicle_Data[VehID][Engine])
    {
        
SendClientMessageToAll(WHITE"Command called! -- Engine is 1");
        
SetVehicleParamsEx(VehID1lightsalarmdoorsbonnetbootobjective);
        
SCM(playeridGREEN"Your engine has been turned on.");
        
Vehicle_Data[VehID][Engine] = true;
    }
    else
    {
        
SendClientMessageToAll(WHITE"Command called! -- Engine is 0");
        
SetVehicleParamsEx(VehID0lightsalarmdoorsbonnetbootobjective);
        
SCM(playeridGREEN"Your engine has been turned of.");
        
Vehicle_Data[VehID][Engine] = false;
    }
    return 
1;

and for your /mask command i need your hitman defines and news to make it so show them to us
Reply
#6

Quote:
Originally Posted by youssefehab500
Посмотреть сообщение
you could have searched before u ask anyways i got it from a topic credits goes to Duck4coder
PHP код:
//place at the top of gamemode
enum vData
{
   
bool:Engine
}
new 
Vehicle_Data[MAX_VEHICLES][vData];
//Place in OnGameModeInit
for(new i=0MAX_VEHICLESi++) Vehicle_Data[i][Engine] = true;
//actual command used zcmd to make this :D
CMD:engine(playeridparams[])
{
    
SendClientMessageToAll(WHITE"Command called!");
    new 
VehID GetPlayerVehicleID(playerid),
        
engine,
        
lights,
        
alarm,
        
doors,
        
bonnet,
        
boot,
        
objective;
 
    
GetVehicleParamsEx(VehIDenginelightsalarmdoorsbonnetbootobjective);
    if(!
Vehicle_Data[VehID][Engine])
    {
        
SendClientMessageToAll(WHITE"Command called! -- Engine is 1");
        
SetVehicleParamsEx(VehID1lightsalarmdoorsbonnetbootobjective);
        
SCM(playeridGREEN"Your engine has been turned on.");
        
Vehicle_Data[VehID][Engine] = true;
    }
    else
    {
        
SendClientMessageToAll(WHITE"Command called! -- Engine is 0");
        
SetVehicleParamsEx(VehID0lightsalarmdoorsbonnetbootobjective);
        
SCM(playeridGREEN"Your engine has been turned of.");
        
Vehicle_Data[VehID][Engine] = false;
    }
    return 
1;

and for your /mask command i need your hitman defines and news to make it so show them to us
ERRORS:
Quote:

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 level
C:\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 level
C:\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.

As you said, I put that script on the top, just under the server's name,
I donno to script its a big problem for me
Reply
#7

Quote:
Originally Posted by RayDwayne
Посмотреть сообщение
ERRORS:


As you said, I put that script on the top, just under the server's name,
I donno to script its a big problem for me
u see above each one its location some goes under ongamemodeinit and some above it take a deaper look
Reply
#8

I dont really understand what should I do in the Pawno, could you tell me where exacly I need to put that script?

Btw:
hitman command :
CMD:givemehit(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
new string[128], targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givemehit [targetid]");

if(IsPlayerConnected(targetid))
{
if(GoChase[playerid] < 999)
{
SendClientMessage(playerid, COLOR_GREY, " You're already busy with another contract!");
return 1;
}
if(GotHit[targetid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Another hitman has already assigned this target!");
return 1;
}
if(PlayerInfo[targetid][pHeadValue] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " That target doesn't have a contract on them!");
return 1;
}
format(string, sizeof(string), "* You have offered yourself a contract to kill %s. (type /accept contract)", GetPlayerNameEx(targetid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
HitOffer[playerid] = playerid;
HitToGet[playerid] = targetid;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " The contracted person is offline, use /contracts!");
return 1;
}
}
return 1;
}
Reply
#9

first of all at the top of the script you got #define <a_samp> if not add it
Reply
#10

I've got this #include <a_samp>
I should add upon it #define <a_samp> ??

I added #define <a_samp> upon it,

Quote:

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.

Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)