[Help] need command - 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)
+--- Thread: [Help] need command (
/showthread.php?tid=495342)
[Help] need command -
Tadas - 16.02.2014
Hello , I have this command:
Код:
if (strcmp("/neon", cmdtext, true, 10) == 0)
{
new neon = CreateObject(18647,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(neon, GetPlayerVehicleID(playerid), -1.049999,0.075000,-0.450000,0.000000,0.000000,0.000000);
return 1;
}
And I need another command where this objects would be removed?
If there are some grammar mistakes sorry, my English is not very good
Re: [Help] need command -
Vanter - 16.02.2014
PHP код:
if (strcmp("/neonoff", cmdtext, true, 10) == 0)
{
DestroyObject(neon);
return 1;
}
Re: [Help] need command -
Tadas - 16.02.2014
I got an error :/
Код:
error 017: undefined symbol "neon"
Re: [Help] need command -
Cvnnor - 16.02.2014
pawn Код:
if (strcmp("/neonoff", cmdtext, true, 10) == 0)
{
new neon = CreateObject(18647,0,0,-1000,0,0,0,100);
DestroyObject(neon);
return 1;
}
Re: [Help] need command -
JJB562 - 16.02.2014
Add this somewhere in your script:
Replace these lines:
pawn Код:
new neon = CreateObject(18647,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(neon, GetPlayerVehicleID(playerid), -1.049999,0.075000,-0.450000,0.000000,0.000000,0.000000);
With this:
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
Neon[vehicleid] = CreateObject(18647,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(Neon[vehicleid], vehicleid, -1.049999,0.075000,-0.450000,0.000000,0.000000,0.000000);
Then in your /neonoff command replace the lines you have with this:
pawn Код:
vehicleid = GetPlayerVehicleID(playerid);
DestroyObject(Neon[vehicleid]);
Re: [Help] need command -
Tadas - 17.02.2014
Thanks