Why doesnt it work?
#1

Ok the code is
Код:
DestroyObject(GetPVarInt(playerid, "blue"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "blue1"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "green"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "green1"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "yellow"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "yellow1"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "white"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "white1"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "pink"));
	            DeletePVar(playerid, "neon");
	            DestroyObject(GetPVarInt(playerid, "pink1"));
	            DeletePVar(playerid, "neon");
	            GameTextForPlayer(playerid, "~g~Neon was deleted from your vehicle",3500,5);
But its not removing the neon,im not able to find out why,ive been trying for awhile.I can give the code that adds it to but im not sure its needed :L
Код:
if(listitem == 0)
		    {
		        SetPVarInt(playerid, "neon", 1);
            	SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
            	SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
            	AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
            	AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
            	GameTextForPlayer(playerid, "~b~ Blue ~w~Neon has been added to your vehicle",3500,5);
			}
			if(listitem == 1)
			{
   				SetPVarInt(playerid, "neon", 1);
       			SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
       			SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
       			AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
          		AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
          		GameTextForPlayer(playerid, "~g~Green ~w~Neon has been added to your vehicle",3500,5);
			}
			if(listitem == 2)
			{
			    SetPVarInt(playerid, "neon", 1);
       			SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
          		SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
            	AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
             	AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				GameTextForPlayer(playerid, "~y~Yellow~w~ Neon has been added to your vehicle",3500,5);
			}
			if(listitem == 3)
			{
   				SetPVarInt(playerid, "neon", 1);
   				SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
   				SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
       			AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
          		AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~w~White~w~ Neon has been added to your vehicle",3500,5);
			}
			if(listitem == 4)
			{
   				SetPVarInt(playerid, "neon", 1);
     			SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
        		SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
          		AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
            	AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				GameTextForPlayer(playerid, "~p~Pink~w~ Neon has been added to your vehicle",3500,5);
			}
As always,any help is greatly appreciated and id +rep if i could :\
Reply
#2

[qoute]As always,any help is greatly appreciated and id +rep if i could :\[/qoute]

Member with 11 post cant +rep You need 50 Post

On Topic: let me check the code you posted
Reply
#3

Quote:
Originally Posted by Domnic Toreto
Посмотреть сообщение
[qoute]As always,any help is greatly appreciated and id +rep IFi could :\[/qoute]

Member with 11 post cant +rep You need 50 Post
Not to be hostile but i did put if :P suggesting i cant but wish i could
Reply
#4

Код:
DestroyObject(GetPVarInt(playerid, "blue"));
DestroyObject(GetPVarInt(playerid, "blue1"));
DestroyObject(GetPVarInt(playerid, "green"));
DestroyObject(GetPVarInt(playerid, "green1"));
DestroyObject(GetPVarInt(playerid, "yellow"));
DestroyObject(GetPVarInt(playerid, "yellow1"));
DestroyObject(GetPVarInt(playerid, "white"));
DestroyObject(GetPVarInt(playerid, "white1"));
DestroyObject(GetPVarInt(playerid, "pink"));
DestroyObject(GetPVarInt(playerid, "pink1"));
DeletePVar(playerid, "neon");
GameTextForPlayer(playerid, "~g~Neon was deleted from your vehicle",3500,5);
Reply
#5

Thank you very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)