12.06.2015, 04:16
Can anyone help me with this please.
Why is it not destroying the objects...
HOW COME It wont destroy the ROPES Spawned for that player?
IT doesn't destroy anything
Where have I gone wrong?
I go ingame...
IT creates the objects..
But...
After 9 seconds
IT doesnt destroy..
Why is it not destroying the objects...
Код:
enum RopeInfo { RopeID, Float: RRX, Float: RRY, Float: RRZ, }; new RopeInformation[MAX_PLAYERS][RopeInfo]; #define MAX_Reppel_Ropes 2500 new RopeObjects[MAX_Reppel_Ropes][RopeInfo]; YCMD:climbrope(playerid, params[], help) { RopeInformation[playerid][RopeID] = CreateDynamicObject(19089, RopeInformation[playerid][RRX], RopeInformation[playerid][RRY], RopeInformation[playerid][RRZ]+5, 0, 0, Angle); RopeInformation[playerid][RopeID] = CreateDynamicObject(19089, RopeInformation[playerid][RRX], RopeInformation[playerid][RRY], RopeInformation[playerid][RRZ]+3, 0, 0, Angle); RopeInformation[playerid][RopeID] = CreateDynamicObject(19089, RopeInformation[playerid][RRX], RopeInformation[playerid][RRY], RopeInformation[playerid][RRZ]+2, 0, 0, Angle); RopeInformation[playerid][RopeID] = CreateDynamicObject(19089, RopeInformation[playerid][RRX], RopeInformation[playerid][RRY], RopeInformation[playerid][RRZ]+1, 0, 0, Angle); RopeInformation[playerid][RopeID] = CreateDynamicObject(19089, RopeInformation[playerid][RRX], RopeInformation[playerid][RRY], RopeInformation[playerid][RRZ]-5, 0, 0, Angle); SetTimerEx("destroyrope",9000, false,"d",playerid); } forward destroyrope(playerid); public destroyrope(playerid) { for(new i=0;i<sizeof(RopeObjects);i++ ) { if(RopeObjects[i][RopeID] != 0) { DestroyDynamicObject(RopeObjects[i][RopeID]); DestroyDynamicObject(RopeInformation[playerid][RopeID]); } } return 1; }
HOW COME It wont destroy the ROPES Spawned for that player?
IT doesn't destroy anything
Where have I gone wrong?
I go ingame...
IT creates the objects..
But...
After 9 seconds
IT doesnt destroy..