11.06.2018, 19:49
Hello Guys,
I want to destroy objects, what is create with CreateDynamicObject.
but with this code it doesn't work
I want to destroy objects, what is create with CreateDynamicObject.
Код:
enum ItemSpawns{ itemid, Float:i_x, Float:i_y, Float:i_z } new iInfo[][ItemSpawns] = { {19165, -1571.1134, -2731.9644, 47.5438} };
Код:
OnGameModeInit for(new i=0; i < sizeof(iInfo); i++) { CreateDynamicObject(iInfo[i][itemid],iInfo[i][i_x],iInfo[i][i_y],iInfo[i][i_z], 0.0, 0.0, 0.0, 0); }
Код:
for(new i=0; i<sizeof(iInfo); i++) { if(!IsPlayerInRangeOfPoint(playerid, 2, iInfo[i][i_x], iInfo[i][i_y], iInfo[i][i_z]))continue; if(GetObjectModel(iInfo[i][itemid] == 19165)) { if(PlayerInfo[playerid][pMap] == 1) { SendClientMessage(playerid, Color_Red, "You have already a map!"); } else { DestroyDynamicObject(iInfo[i][itemid]); PlayerInfo[playerid][pMap] = 1; GangZoneHideForPlayer(playerid, blackmap); } } }