Help, how to create a Dynamic object when attempting robbery
#1

Hy all, please help me to create a dynamic object (Locker) when attempt a robbery, this is the code in my script :
Код:
new Locker = 1829;
Код:
stock CreateLocker(playerid)
{
    new Float:x, Float:y, Float:z, Float:a;
	GetPlayerPos(playerid, x, y, a);
	GetPlayerFacingAngle(playerid, a);
    CreateDynamicObject(Locker,x + (20.0 * floatsin(-a, degrees)), y + (20.0 * floatcos(-a, degrees)), z+20,0,0,0);
    return 1;
}
Код:
DestroyDynamicObject(Locker);
Im new at this programming language.
Can you help me? Thanks.
Reply
#2

pawn Код:
new Locker;
pawn Код:
stock CreateLocker(playerid)
{
    new Float:x, Float:y, Float:z, Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    Locker = CreateDynamicObject(1829, x + (20.0 * floatsin(-a, degrees)), y + (20.0 * floatcos(-a, degrees)), z+20,0,0,0);
    return 1;
}
pawn Код:
DestroyDynamicObject(Locker);
That's the right way to do it.
Reply
#3

0s0s0s
Reply
#4

Quote:
Originally Posted by Stinged
Посмотреть сообщение
pawn Код:
new Locker;
pawn Код:
stock CreateLocker(playerid)
{
    new Float:x, Float:y, Float:z, Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    Locker = CreateDynamicObject(1829, x + (20.0 * floatsin(-a, degrees)), y + (20.0 * floatcos(-a, degrees)), z+20,0,0,0);
    return 1;
}
pawn Код:
DestroyDynamicObject(Locker);
That's the right way to do it.
That is not Dynamic.
Reply
#5

- <> 0
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)