Come back object - 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: Come back object (
/showthread.php?tid=392021)
Come back object -
phil_lendon - 12.11.2012
I have a gate thing which when /open itdestroys the gate but whats the cmd for the gates to come back?
pawn Код:
if(!strcmp(cmdtext, "/open", true)){
DestroyDynamicObject(impoundgate1);
DestroyDynamicObject(impoundgate2);
SendClientMessage(playerid, 0x0000BBAA, "Impound Opened");
return 1;
}
Re: Come back object -
rbush12 - 12.11.2012
Thats because it is told to destroy the object...
Re: Come back object -
NumbSkull - 12.11.2012
why dont you just move the object? but if you insist on destroying it make a cmd to create object in that spot
Re: Come back object -
phil_lendon - 12.11.2012
I tried to move it but every time.. it wouldnt move :L
Re: Come back object -
Faisal_khan - 12.11.2012
What do you mean by "move it". Did you tried using MoveObject?
Re: Come back object -
NumbSkull - 12.11.2012
MoveDynamicObject(impoundgate1,x+5,y,z,4);
return 1;
fill in x,y,z with its cords
you dont have to +5 the x you can move y or z or all 3 + or - have fun
Re: Come back object -
phil_lendon - 12.11.2012
I used
pawn Код:
if(!strcmp(cmdtext, "/iio", true)){
MoveDynamicObject(impoundgate1, 1901.51, -1865.99, 14.65, 0.00, 0.00, 272.37);
MoveDynamicObject(impoundgate2, 1892.43, -1865.98, 14.65, 0.00, 0.00, 271.86);
SendClientMessage(playerid, 0x0000BBAA, "Impound Opened");
return 1;
}
if(!strcmp(cmdtext, "/iic", true)){
MoveDynamicObject(impoundgate1, 1892.43, -1865.98, 14.65, 0.00, 0.00, 180.00); //gate1
MoveDynamicObject(impoundgate2, 1892.43, -1865.98, 14.65, 0.00, 0.00, 180.00); //gate2
SendClientMessage(playerid, 0xAA3333AA, "Impound Closed");
return 1;
}
Re: Come back object -
Faisal_khan - 12.11.2012
Is it working?
Re: Come back object -
phil_lendon - 12.11.2012
The code I just sent doesnt work.
Re: Come back object -
phil_lendon - 12.11.2012
BUMP