fbicar[1] = CreateVehicle(560,1265.9680000,-1670.0131000,13.1421000,0.0000000,2,2,12000, 1) //Sultan
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
if(newstate) GameTextForPlayer(playerid, "~W~Siren ~G~on", 1000, 3);
GameTextForPlayer(playerid, "~W~Siren ~r~off", 1000, 3);
return 1;
}
|
I posted the code on the end of code is 1.
1 enable the siren of police 0 disable. and i have Код:
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
if(newstate) GameTextForPlayer(playerid, "~W~Siren ~G~on", 1000, 3);
GameTextForPlayer(playerid, "~W~Siren ~r~off", 1000, 3);
return 1;
}
|
|
Well where is this? Is it located to the script you trying to test?
https://sampwiki.blast.hk/wiki/GetVehicleParamsSirenState |
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;
}
|
Код:
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;
}
|
|
That's pretty much the exact same code that's on the wiki page, you've just added the else statement.
|
native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawndelay, addsiren=0); fbicar[1] = CreateVehicle(560,1265.9680000,-1670.0131000,13.1421000,0.0000000,2,2,12000, 1) //Sultan