CMD:destroyvehicleobjects(playerid, params[]) { DestroyDynamicObject(danodano1); DestroyDynamicObject(danodano); DestroyDynamicObject(neon); DestroyDynamicObject(neon1); DestroyDynamicObject(neon2); DestroyDynamicObject(neon3); DestroyDynamicObject(neon4); DestroyDynamicObject(neon5); DestroyDynamicObject(neon6); DestroyDynamicObject(neon7); DestroyDynamicObject(neon8); DestroyDynamicObject(neon9); DestroyDynamicObject(neon10); DestroyDynamicObject(neon11); DestroyDynamicObject(neon12); DestroyDynamicObject(neon13); DestroyDynamicObject(interior1); DestroyDynamicObject(interior2); DestroyDynamicObject(back); DestroyDynamicObject(back2); DestroyDynamicObject(front); DestroyDynamicObject(front2); DestroyDynamicObject(undercover); DestroyDynamicObject(undercover1); }
if(listitem == 6) { //police SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "neon12", CreateDynamicObject(18646,0,0,0,0,0,0)); SetPVarInt(playerid, "neon13", CreateDynamicObject(18646,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "neon12"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "neon13"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xFFFFFFAA, "neon installed"); }
new neon13;
That is setting a PVarInt, not defining a new variable...
You should have something like: pawn Код:
|
CMD:destroyvehicleobjects(playerid, params[])
{
DestroyDynamicObject(GetPVarInt(playerid, danodano1));
DestroyDynamicObject(GetPVarInt(playerid, danodano));
DestroyDynamicObject(GetPVarInt(playerid, neon));
DestroyDynamicObject(GetPVarInt(playerid, neon1));
DestroyDynamicObject(GetPVarInt(playerid, neon2));
DestroyDynamicObject(GetPVarInt(playerid, neon3));
DestroyDynamicObject(GetPVarInt(playerid, neon4));
DestroyDynamicObject(GetPVarInt(playerid, neon5));
DestroyDynamicObject(GetPVarInt(playerid, neon6));
DestroyDynamicObject(GetPVarInt(playerid, neon7));
DestroyDynamicObject(GetPVarInt(playerid, neon8));
DestroyDynamicObject(GetPVarInt(playerid, neon9));
DestroyDynamicObject(GetPVarInt(playerid, neon10));
DestroyDynamicObject(GetPVarInt(playerid, neon11));
DestroyDynamicObject(GetPVarInt(playerid, neon12));
DestroyDynamicObject(GetPVarInt(playerid, neon13));
DestroyDynamicObject(GetPVarInt(playerid, interior1));
DestroyDynamicObject(GetPVarInt(playerid, interior2));
DestroyDynamicObject(GetPVarInt(playerid, back));
DestroyDynamicObject(GetPVarInt(playerid, back2));
DestroyDynamicObject(GetPVarInt(playerid, front));
DestroyDynamicObject(GetPVarInt(playerid, front2));
DestroyDynamicObject(GetPVarInt(playerid, undercover));
DestroyDynamicObject(GetPVarInt(playerid, undercover1));
}
Instead of making him rewrite all his code because you don't understand PVars(Per-Player variable system), just use mine I posted below.
pawn Код:
|
CMD:destroyvehicleobjects(playerid, params[])
{
DestroyDynamicObject(GetPVarInt(playerid, "danodano1"));
DestroyDynamicObject(GetPVarInt(playerid, "danodano"));
DestroyDynamicObject(GetPVarInt(playerid, "neon"));
DestroyDynamicObject(GetPVarInt(playerid, "neon1"));
DestroyDynamicObject(GetPVarInt(playerid, "neon2"));
DestroyDynamicObject(GetPVarInt(playerid, "neon3"));
DestroyDynamicObject(GetPVarInt(playerid, "neon4"));
DestroyDynamicObject(GetPVarInt(playerid, "neon5"));
DestroyDynamicObject(GetPVarInt(playerid, "neon6"));
DestroyDynamicObject(GetPVarInt(playerid, "neon7"));
DestroyDynamicObject(GetPVarInt(playerid, "neon8"));
DestroyDynamicObject(GetPVarInt(playerid, "neon9"));
DestroyDynamicObject(GetPVarInt(playerid, "neon10"));
DestroyDynamicObject(GetPVarInt(playerid, "neon11"));
DestroyDynamicObject(GetPVarInt(playerid, "neon12"));
DestroyDynamicObject(GetPVarInt(playerid, "neon13"));
DestroyDynamicObject(GetPVarInt(playerid, "interior1"));
DestroyDynamicObject(GetPVarInt(playerid, "interior2"));
DestroyDynamicObject(GetPVarInt(playerid, "back"));
DestroyDynamicObject(GetPVarInt(playerid, "back2"));
DestroyDynamicObject(GetPVarInt(playerid, "front"));
DestroyDynamicObject(GetPVarInt(playerid, "front2"));
DestroyDynamicObject(GetPVarInt(playerid, "undercover"));
DestroyDynamicObject(GetPVarInt(playerid, "undercover1"));
}