02.01.2013, 00:59
Hello!
I have made a simple neon cmd that adds neon type lights at the bottom of the vehicle.
My problem is that they do not save; when you close the console or vehicles reload they're removed from the vehicle.
Here is my code:
I need help with making these neon's save. Thanks for any help.
I am also new with Pawno so no bullying!
Regards,
Aaron.
I have made a simple neon cmd that adds neon type lights at the bottom of the vehicle.
My problem is that they do not save; when you close the console or vehicles reload they're removed from the vehicle.
Here is my code:
pawn Code:
CMD:addneon(playerid, params[])
{
new neon1 = CreateObject(18648,0,0,0,0,0,0,100.0);
new neon2 = CreateObject(18648,0,0,0,0,0,0,100.0);
if(PlayerInfo[playerid][pAdmin] < 3)
{
return SendClientMessageEx(playerid, COLOR_RED, "You do not have permission to use this cmd.");
}
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
AttachObjectToVehicle(neon1, GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(neon2,GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFFF, "Neon lights have been installed to the vehicle..");
return 1;
}
I am also new with Pawno so no bullying!
Regards,
Aaron.