// Creates an in game object by /spawnobject objectid, 0 0 <-- some reason have to do 0 0 after id to make it spawn. and everything spawns at a slanted angle, make it where you can put in a way to tell it /spawnobject objectid angle rotation angle = left and right rotation would be from an object sitting on its side to being level with the ground. //defines: new Createdobjects[1800]; new Createdobject = 0; //--------------------------------[spawn object]-------------------------------------------------- if(strcmp(cmd, "/spawnobject", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /spawnobject [objectid]"); return 1; } new object; object = strval(tmp); if(object < 615 || object > 18112) { SendClientMessage(playerid, COLOR_GREY, " Object Number can't be below 615 or above 18112 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /spawnobject [objectid 615-18112]"); return 1; } // new Float:X,Float:Y,Float:Z; // GetPlayerPos(playerid, X,Y,Z); new objectid = CreateObject(object, X,Y,Z, 0.0, 60000); Createdobjects[Createdobject] = objectid; Createdobject ++; new string[64]; format(string, sizeof(string), " object %d spawned.", objectid); SendClientMessage(playerid, COLOR_GREY, string); { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /spawnobject [objectid]"); return 1; } } return 1; }