Argument Type Mismatch?
#1

fix.
Reply
#2

instead of using the number 1, you need a variable to store the current state of the lights in.
If you want to check if the lights are on, just do something like:
pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(GetVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
if(lights==1)
{
   enter code here
}
Reply
#3

See, I was certain it had to look something like that, I just wasn't 100% sure how to set it up. Thanks for the help, no errors.
Reply
#4

fix.
Reply
#5

This would be enough:
pawn Код:
if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, COLOR_RED, "[ERROR] You cannot use this command while you are not the driver of a vehicle!");
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
if(lights != 1) SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, 1, alarm, doors, bonnet, boot, objective);
else SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, 0, alarm, doors, bonnet, boot, objective);
Reply
#6

I know, I added the messages for my own debugging purpose. I need the code fixed, not re-written.
Reply
#7

Question, what is the problem right now? Is it that the message wont show up or the code isnt working?
Reply
#8

Quote:
Originally Posted by Antonio [G-RP]
Посмотреть сообщение
fix.
Why are you editing your questions out? Even though this is a common issue, you should leave the question intact so people who have the same issue can search and find the answer :P.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)