C:\Users\logan_000\Desktop\SAMP Server\gamemodes\lramos15.pwn(350) : error 036: empty statement C:\Users\logan_000\Desktop\SAMP Server\gamemodes\lramos15.pwn(356) : error 017: undefined symbol "myobject"
new myobject = CreateObject(18646,0,0,-1000,0,0,0,100); AttachObjectToVehicle(myobject, GetPlayerVehicleID(playerid), 0.449999,0.000000,0.599999,0.000000,0.000000,0.000000);; return 1;
Is there any way to go if vehicle = or something like that? also With my siren command I get
Код HTML:
C:\Users\logan_000\Desktop\SAMP Server\gamemodes\lramos15.pwn(350) : error 036: empty statement C:\Users\logan_000\Desktop\SAMP Server\gamemodes\lramos15.pwn(356) : error 017: undefined symbol "myobject" Код HTML:
new myobject = CreateObject(18646,0,0,-1000,0,0,0,100); AttachObjectToVehicle(myobject, GetPlayerVehicleID(playerid), 0.449999,0.000000,0.599999,0.000000,0.000000,0.000000);; return 1; |
// Siren new myobject; CMD:siren(playerid, params[]) { myobject = CreateObject(18646,0,0,-1000,0,0,0,100); AttachObjectToVehicle(myobject, GetPlayerVehicleID(playerid), 0.449999,0.000000,0.599999,0.000000,0.000000,0.000000); return 1; } //siren off CMD:sirenoff(playerid, params[]) { DestroyPlayerObject(playerid, myobject); return 1; }
CMD:siren(playerid, params[])
{
if(!IsValidObject(myobject))
{
myobject = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(myobject, GetPlayerVehicleID(playerid), 0.449999,0.000000,0.599999,0.000000,0.000000,0.000000);
}
else
{
DestroyObject(myobject);
}
return 1;
}
CMD:siren(playerid, params[])
{
if(!IsValidObject(myobject) && GetVehicleModel(GetPlayerVehicleID(playerid)) == yourid)
{
myobject = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(myobject, GetPlayerVehicleID(playerid), 0.449999,0.000000,0.599999,0.000000,0.000000,0.000000);
}
else
{
DestroyObject(myobject);
}
return 1;
}