29.11.2014, 22:18
This is how the script looks right now but still doesn't work, it compiles, but when I am in game and type /object nothing will appear. Not even the client message.
Код:
COMMAND:object(playerid, params[]) { // Setup local variables new ObjectModel, ObjID, Msg[128], Float:plocx,Float:plocy,Float:plocz,Float:ploca; // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 5 if (APlayerData[playerid][PlayerLevel] >= 5) { if (sscanf(params, "i", ObjectModel)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /object <ObjectModel>"); GetPlayerPos(playerid, plocx, plocy, plocz); GetPlayerFacingAngle(playerid,ploca); ObjID = CreateObject(ObjectModel, plocx, plocy, plocz, 0.0, 0.0, 0.0, 5.0); // Inform the player about it format(Msg, 128, "You spawned object-id %i (model-id = %i) at coords: x=%4.2f, y=%4.2f, z=%4.2f", ObjID, ObjectModel, plocx, plocy, plocz); SendClientMessage(playerid, 0x00FF00FF, Msg); } else return 0; } else return 0; return 1; }