0.3.7 sirens -
Jack_Leslie - 22.03.2016
Hey guys
It's been a few months since I've attempted to script
So i've noticed the new siren feature, but it's not working for me??
pawn Код:
CreateVehicle(422, -228.6539, 984.3220, 19.5766, 358.2817, 111, 31, 1); // Red County - Sheriff Bobcat
I found this on the sa-mp wiki:
pawn Код:
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
if(newstate) GameTextForPlayer(playerid, "~W~Siren ~G~on", 1000, 3);
else GameTextForPlayer(playerid, "~W~Siren ~r~off", 1000, 3);
return 1;
}
And in a police car that code will run, but in a normal car with a siren enabled it doesn't run, and there's no siren sound?
Re: 0.3.7 sirens -
SickAttack - 22.03.2016
Count the number of arguments? The "addsiren" argument is the 9th, you only have 8.
Re: 0.3.7 sirens -
Jack_Leslie - 22.03.2016
Quote:
Originally Posted by SickAttack
Count the number of arguments? The "addsiren" argument is the 9th, you only have 8.
|
Oh, sorry I'm blonde.. thanks
Actually, edit:
pawn Код:
CreateVehicle(422, -228.6539, 984.3220, 19.5766, 358.2817, 111, 31, 2500, 1); // Red County - Sheriff Bobcat
That gives me number of arguments don't match the definition, that's why I only had 8.
Re: 0.3.7 sirens -
SickAttack - 22.03.2016
Quote:
Originally Posted by Jack_Leslie
I get number of arguments does not match definition when I add the 9th argument for the siren, I'm using all the latest includes and the latest SA-MP version. I've had a lot of weird bugs lately. Like strcmp not detecting if a string is null.
|
Double check if your includes are actually updated. And make sure you are using the compiler that has the latest includes in the pawno folder.
About the strcmp matter, strcmp doesn't "detect" if a string is null, it returns false if the string is null.
Quote:
Originally Posted by SA-MP Wiki
This function returns 0 if either string is empty. Check for null strings with isnull(). If you do not, for example, people can login to anyone's account by simply entering a blank password.
|
P.S. I'm
blonde too
Re: 0.3.7 sirens -
Jack_Leslie - 22.03.2016
Quote:
Originally Posted by SickAttack
Double check if your includes are actually updated. And make sure you are using the compiler that has the latest includes in the pawno folder.
About the strcmp matter, strcmp doesn't "detect" if a string is null, it returns false if the string is null.
P.S. I'm blonde too
|
Re-downloaded the latest server files from the SA-MP website and it still says the number of arguments don't match the definition..
EDIT:
I had a GetVehicleColor include that had it's owned definition of CreateVehicle, so I changed the name of that in the include! Knew it was something small and blonde. Thanks for time SickAttack!
Re: 0.3.7 sirens -
SickAttack - 22.03.2016
Quote:
Originally Posted by Jack_Leslie
Re-downloaded the latest server files from the SA-MP website and it still says the number of arguments don't match the definition..
|
Download the whole package and use that package. Open pawno, open your gamemode. And see if it works.
Re: 0.3.7 sirens -
Jack_Leslie - 22.03.2016
Quote:
Originally Posted by SickAttack
Download the whole package and use that package. Open pawno, open your gamemode. And see if it works.
|
Check the edit, I had an include that was interfering, thanks