CMD:obj(playerid,params[]){ if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][Admin] >= 4) { new parameter[64],objektum; if(sscanf(params, \"s[64]d\",parameter,objektum)) return SCM(playerid,WHITE,\"(( Használat: /obj(ect) [tipus] [id] ))\"), SCM(playerid,WHITE,\"(( Típusok: uj, torol ))\"); { if(egyezik(parameter,\"uj\")) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); new objid = CreateDynamicObject(objektum,x,y+5,z+1,0,0,0); EditDynamicObject(playerid,objid); } else if(egyezik(parameter,\"torol\")) { new file[32]; format(file,sizeof(file),\"/Objektek/%d.ini\",objektum); if(fexist(file)) { dini_Remove(file); SFM(playerid,GREEN,\"(( Töröltél egy objektet! [%d] ))\",objektum); return 1; } else { SCM(playerid,ORANGE,\"(( Nincs ilyen objekt! ))\"); return 1; } } } } } return 1;}
#define GetDynamicObjectModel(%0) Streamer_GetIntData(STREAMER_TYPE_OBJECT, %0, E_STREAMER_MODEL_ID)public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz){if(response == EDIT_RESPONSE_FINAL){new string[56];getdate(ev,honap,nap);gettime(ora,perc,masodperc);format(string,sizeof(string),\"%d-%d-%d_%d:%d:%d\",ev,honap,nap,ora,perc,masodperc);new objid = UjObjectID();ObjectInfo[objid][ObjVan] = 1;ObjectInfo[objid][ObjModel] = GetDynamicObjectModel(objectid));ObjectInfo[objid][ObjPosX] = x;ObjectInfo[objid][ObjPosY] = y;ObjectInfo[objid][ObjPosZ] = z;ObjectInfo[objid][ObjRotRX] = rx;ObjectInfo[objid][ObjRotRY] = ry;ObjectInfo[objid][ObjRotRZ] = rz;ObjectInfo[objid][ObjDatum] = string;ObjectInfo[objid][ObjKeszitette] = pname(playerid);new file[32];format(file,sizeof(file),\"/Objektek/%d.ini\",objid);if(!fexist(file)) { dini_Create(file); dini_IntSet(file,\"ObjVan\",1); dini_IntSet(file,\"ObjModel\",GetDynamicObjectModel(objectid)); dini_FloatSet(file,\"ObjPosX\",ObjectInfo[objid][ObjPosX]); dini_FloatSet(file,\"ObjPosY\",ObjectInfo[objid][ObjPosY]); dini_FloatSet(file,\"ObjPosZ\",ObjectInfo[objid][ObjPosZ]); dini_FloatSet(file,\"ObjRotRX\",ObjectInfo[objid][ObjRotRX]); dini_FloatSet(file,\"ObjRotRY\",ObjectInfo[objid][ObjRotRY]); dini_FloatSet(file,\"ObjRotRZ\",ObjectInfo[objid][ObjRotRZ]); dini_Set(file,\"ObjDatum\",ObjectInfo[objid][ObjDatum]); dini_Set(file,\"ObjKeszitette\",pname(playerid)); }}return 1;}