Neon script problem -
iRealSAMP - 03.03.2012
hello
I have a problem, I recently created a command that gamemod buy your car neon. You can put / neon colored and have to turn it off / neon off, everything goes very well even it you buy it!
We took the controls / park / apark / sellcar / sellcarto and everything belongs to the car when you take action to stop the orders that neon has no problems. Okay, so here goes everything perfect
The question to me is the following! If the player has the car and he goes neon, neon remains on the car, but when he came off it but can not in any way! Only restart the server it disappears! So the player has on the car, but it has bought neon paote off at all!
Why, I can warn the player if he will not be blocking it before it left out
But sometimes crash and get going and look, stay permanent neon car because you can not go out, how do? even when the player pushes his car neon on the left even so
But it is complicated .. any way is welcome, but beg you help me!
AW: Neon script problem -
Drebin - 03.03.2012
Show us the code.
Re: Neon script problem -
iRealSAMP - 04.03.2012
An example of a neon light it
Код:
else if(strcmp(x_nr,"roz",true) == 0)
{
if(PlayerInfo[playerid][pPcarkey] != 999)
{
if (CarInfo[carid][cNeon] == 1)
{
if(NeonStatus[carr] == 0)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~w~Neon ~g~on", 4000, 3);
}
}
else
SCM(playerid, COLOR_GRAD3, "** You don't have neon !");
return 1;
}
else
SCM(playerid, COLOR_GRAD3, "** You don't own a car !");
return 1;
}
and one that eliminates everywhere is
Код:
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon2"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon3"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon4"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon5"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon6"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon7"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon8"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon9"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon10"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon11"));
DeletePVar(playerid, "Status");
DestroyObject(18647);
DestroyObject(18648);
DestroyObject(18649);
DestroyObject(18652);
DestroyObject(18651);
DestroyObject(18650);
Re: Neon script problem -
iRealSAMP - 05.03.2012
help me
?
Re: Neon script problem -
iRealSAMP - 07.03.2012
Re: Neon script problem -
iRealSAMP - 07.03.2012
So I concluded that you can not do anything that is going but
I want to do when the player leaves the server "OnplayerDisconnet"
to be left on the car neon
kind
Код:
new vehicleid = GetPlayerVehicleID(vehicleid)
DestroyObject(GetPVarInt(vehicleid, "neon"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon1"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon2"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon3"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon4"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon5"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon6"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon7"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon8"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon9"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon10"));
DeletePVar(vehicleid, "Status");
DestroyObject(GetPVarInt(vehicleid, "neon11"));
DeletePVar(vehicleid, "Status");
DestroyObject(18647);
DestroyObject(18648);
DestroyObject(18649);
DestroyObject(18652);
DestroyObject(18651);
DestroyObject(18650);
but it did not work, you can help me?
Re: Neon script problem -
iRealSAMP - 08.03.2012
help me please
(((
Re: Neon script problem -
Mike_Peterson - 08.03.2012
So, I couldn't understand your first post, so i'm just going to ask.
What exactly is the problem? You want Neon to stay on the car, even when the player disconnects??
Re: Neon script problem -
iRealSAMP - 09.03.2012
I when that player out! to them to destroy the car neon!
Re: Neon script problem -
Marco_Valentine - 09.03.2012
When a player logs out he wants the neon to disapear as well. So long as that player owned the car with the neon