18.02.2018, 12:48
Hello, I have added something from another script but I got errors
about this:
How to define this and or is it a plugin/include ?
Код:
./includes/functions.pwn(17710) : error 017: undefined symbol "GetGVarInt" ./includes/functions.pwn(17712) : error 017: undefined symbol "GetGVarInt" ./includes/functions.pwn(17713) : error 017: undefined symbol "DeleteGVar" ./includes/functions.pwn(17715) : error 017: undefined symbol "GetGVarInt" ./includes/functions.pwn(17717) : error 017: undefined symbol "GetGVarInt" ./includes/functions.pwn(17718) : error 017: undefined symbol "DeleteGVar" ./includes/functions.pwn(17729) : error 017: undefined symbol "SetGVarInt" ./includes/functions.pwn(17735) : error 017: undefined symbol "SetGVarInt" ./includes/functions.pwn(17741) : error 017: undefined symbol "SetGVarInt" ./includes/functions.pwn(17747) : error 017: undefined symbol "SetGVarInt" ./includes/functions.pwn(17755) : error 017: undefined symbol "SetGVarInt" ./includes/functions.pwn(17756) : error 017: undefined symbol "SetGVarInt" ./includes/functions.pwn(17762) : error 017: undefined symbol "SetGVarInt"
PHP код:
stock ToggleSiren(vehid, iTogState)
{
if(iTogState == 1)
{
if(GetGVarInt("VehSiren", vehid) != INVALID_OBJECT_ID)
{
DestroyDynamicObject(GetGVarInt("VehSiren", vehid));
DeleteGVar("VehSiren", vehid);
}
if(GetGVarInt("VehSiren2", vehid) != INVALID_OBJECT_ID)
{
DestroyDynamicObject(GetGVarInt("VehSiren2", vehid));
DeleteGVar("VehSiren2", vehid);
}
}
else
{
switch(GetVehicleModel(vehid))
{
case 402:
{
new iTempObj = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0);
AttachDynamicObjectToVehicle(iTempObj, vehid, -0.20, 0.5, 0.4, 0.0, 0.0, 0.0);
SetGVarInt("VehSiren", iTempObj, vehid);
}
case 411, 541:
{
new iTempObj = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0);
AttachDynamicObjectToVehicle(iTempObj, vehid, 0.0, 0.2, 0.4, 0.0, 0.0, 0.0);
SetGVarInt("VehSiren", iTempObj, vehid);
}
case 415:
{
new iTempObj = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0);
AttachDynamicObjectToVehicle(iTempObj, vehid, -0.20, 0.30, 0.3, 0.0, 0.0, 0.0);
SetGVarInt("VehSiren", iTempObj, vehid);
}
case 451:
{
new iTempObj = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0);
AttachDynamicObjectToVehicle(iTempObj, vehid, -0.30, 0.4, 0.6, 0.0, 0.0, 0.0);
SetGVarInt("VehSiren", iTempObj, vehid);
}
case 525:
{
new iTempObj2 = CreateDynamicObject(19294, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0);
new iTempObj3 = CreateDynamicObject(19294, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0);
AttachDynamicObjectToVehicle(iTempObj2, vehid, 0.55, -0.5, 1.5, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(iTempObj3, vehid, -0.55, -0.5, 1.5, 0.0, 0.0, 0.0);
SetGVarInt("VehSiren", iTempObj2, vehid);
SetGVarInt("VehSiren2", iTempObj3, vehid);
}
default:
{
new iTempObj = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, 200.0);
AttachDynamicObjectToVehicle(iTempObj, vehid, -0.30, 0.4, 0.4, 0.0, 0.0, 0.0);
SetGVarInt("VehSiren", iTempObj, vehid);
}
}
}
return 1;
}
hook OnVehicleSpawn(vehicleid)
{
if(GetGVarType("VehSiren", vehicleid)) ToggleSiren(vehicleid, 1);
}
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
if(DynVeh[vehicleid] != -1)
{
for(new i = 0; i != MAX_DV_OBJECTS; i++)
{
ToggleDVSiren(DynVeh[vehicleid], i, newstate);
}
}
switch(newstate)
{
case 0: ToggleSiren(vehicleid, 1);
case 1:
{
if(!GetGVarType("VehSiren", vehicleid)) ToggleSiren(vehicleid, 0);
}
}
return 1;
}