SA-MP Forums Archive
Help me fast.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me fast.. (/showthread.php?tid=243801)



Help me fast.. - Ironboy - 24.03.2011

I have made a neon and it is working fine.
Is it permenent? it will not go?Is there any way to remove it?


Re: Help me fast.. - TheYoungCapone - 24.03.2011

not sure what ur asking you say is there any way to remove it yea delete it from ur script.


Re: Help me fast.. - Ironboy - 24.03.2011

hmm not that.
look this code
pawn Код:
CMD:neon(playerid,params[]) {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon1", CreateObject(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);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neon installed");
    return 1;}
this is the command.If i use it it will not go.I want it to be removed, when a player use a command


Re: Help me fast.. - Vince - 24.03.2011

pawn Код:
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "neon");



Re: Help me fast.. - Davz*|*Criss - 24.03.2011

Hmm dude try wiki,

DestroyObject or some thing i don't remember the code, and yeah it is not permanent.



Re: Help me fast.. - TheYoungCapone - 24.03.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
hmm not that.
look this code
pawn Код:
CMD:neon(playerid,params[]) {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon1", CreateObject(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);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neon installed");
    return 1;}
this is the command.If i use it it will not go.I want it to be removed, when a player use a command
Hmm your code looks right maybe you have something else thats messing with it. BTW heres one that i use
Код:
if(strcmp(cmdtext,"/blueneon",true)==0)
{
     SetPVarInt(playerid, "Status", 1);
     SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
     SetPVarInt(playerid, "neon5", CreateObject(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);
     return 1;
}
Код:
if(strcmp(cmdtext,"/removeallneon",true)==0)
{
     DestroyObject(GetPVarInt(playerid, "neon4"));
     DeletePVar(playerid, "Status");
     DestroyObject(GetPVarInt(playerid, "neon5"));
     DeletePVar(playerid, "Status");
     return 1;
}



Re: Help me fast.. - Ironboy - 24.03.2011

ok ty