01.05.2014, 08:46
title says all! i can spawn objects, but i can't delete it! because the filterscripts doesn't have /deleteobjects or etc... but it has /object [id]
Код:
dcmd_object(playerid,params[]) { if(AccInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) { if(!strlen(params)) return SendClientMessage(playerid, LIGHTBLUE2, "Usage: /object [ObjectID]") && SendClientMessage(playerid, orange, "Function: Will created a specified Object"); new ObjID = strval(params), string[128]; new Float:X, Float:Y, Float:Z, Float:Ang; SendCommandToAdmins(playerid,"Object"); GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, Ang); X += (3 * floatsin(-Ang, degrees)); Y += (3 * floatcos(-Ang, degrees)); CreateObject(ObjID, X, Y, Z, 0.0, 0.0, Ang); format(string, sizeof(string), "CreateObject(%d, %0.2f, %0.2f, %0.2f, 0.00, 0.00, %0.2f);", ObjID, X, Y, Z, Ang); SaveIn("CreatedObjects",string); format(string, sizeof(string), "|- Object Created: (Id: %d) (Position: X: %0.2f, Y: %0.2f, Z: %0.2f) (Angle: %0.2f) -|", ObjID, X, Y, Z, Ang); return SendClientMessage(playerid,yellow, string); } else return ErrorMessages(playerid, 1); }