07.06.2012, 07:22
Well.. I've tried it with different ways.. With Neons / Sirens.. etc - But still , it don't work..
I am using a Streamer.. Here is some of my CMD's..
none of them works.. I have other CMD's like that.. but - Everything in the CMD works except the Object - it never get attached -.-.. Hope someone can help
I am using a Streamer.. Here is some of my CMD's..
PHP код:
if(strcmp(cmd, "/addsiren", true) == 0)
{
new VID = GetPlayerVehicleID(playerid);
if(IsACop(playerid) || IsAAgent(playerid))
{
BigSiren[VID] = CreateDynamicObject(19419, 10.0, 10.0, 10.0, 0, 0, 0);
AttachObjectToVehicle(BigSiren[VID], VID, -0.039999, -0.469999, 0.669999, 0.000000, 0.000000, 0.000000);
format(string, sizeof(string), "* %s puts the siren on the vehicle's roof.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_WHITE,"You are not a cop");
}
return 1;
}
PHP код:
//blue
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateDynamicObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateDynamicObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
if(listitem == 1)
{
//red
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon2", CreateDynamicObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon3", CreateDynamicObject(18647,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
if(listitem == 2)
{
//green
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon4", CreateDynamicObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "neon5", CreateDynamicObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}