SA-MP Forums Archive
Robbing a shop - 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: Robbing a shop (/showthread.php?tid=453083)



Robbing a shop - nor15 - 23.07.2013

I made a script that you rob a shop then the player make an animation then a object is created in front of him

The problem is that i can't make the object be created in front of him , the object ID is : 1829


Re: Robbing a shop - Aerotactics - 23.07.2013

Something like this perhaps:

new object;
new bool: etc...
if (robbing the store == 1)
{
object=create object (1829)
}
else if (robbing the store == 0)
{
deleteobject(object)
}

Not this exactly but like this.


Re: Robbing a shop - nor15 - 23.07.2013

ok but their must be Position , like GetPlayerPos(x,y,z) then CreateObject(x+something ,y+something,z+something); , but i dunno why when i make them the object don't be created as it under the ground or something


Re: Robbing a shop - JimmyCh - 23.07.2013

Are you sure it's in the same virtual world and interior? Also that's in not under the ground or above the ceiling?
What object is 1829? Sometimes you need to check maybe the object creates above you like z+5, so then instead of CreateObject at X,Y,Z, you will need to put X,Y,Z-5, I hope you understand what I mean..


Re: Robbing a shop - nor15 - 23.07.2013

Thanks , But I made that it make an Animation but the problem is that the Object is created but the Animation isn't Done.
PHP код:
CreateObject(1829,x+1,y,z,0.0,0.0,96.0);
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",4.1,1,1,1,1,1);
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",4.1,1,1,1,1,1); 



Re: Robbing a shop - JimmyCh - 23.07.2013

Why did you apply the ApplyAnimation twice? Maybe that's why it doesn't work(Just guessing).
It can't be the object's problem..


Re: Robbing a shop - nor15 - 23.07.2013

Made it only one , but when i remove the Object , the Animation is done correctly