16.12.2014, 03:58
(
Последний раз редактировалось JawsPlus; 18.12.2014 в 02:18.
)
This code is after i rob a store , it will create a locker in the store.
i robbed 4 store , but after the robbery checkpoint cooldown , the locker only destroy the last locker that i rob.
Help me pls
i robbed 4 store , but after the robbery checkpoint cooldown , the locker only destroy the last locker that i rob.
Help me pls
Код:
new csafe[MAX_PLAYERS]; stock CreateLocker(playerid) { new Locker = 1829; new Float:pos[3]; new Float:Angle; new pworld = GetPlayerVirtualWorld(playerid); new pint = GetPlayerInterior(playerid); GetPlayerFacingAngle(playerid, Angle); GetPlayerPos(playerid, pos[0], pos[1], pos[2]); pos[0] += (1 * floatsin(-Angle, degrees)); pos[1] += (1 * floatcos(-Angle, degrees)); csafe[playerid] = CreateDynamicObject(Locker,pos[0],pos[1],pos[2],0,0,Angle,pworld,pint); return 1; }
Код:
stock dsafe(playerid) { DestroyDynamicObject(csafe[playerid]); return 1; }