27.10.2013, 19:56
(
Последний раз редактировалось Sewayne; 27.10.2013 в 20:41.
)
There seems to be a problem with my commands which includes sscanf. Looking at this below, you can see it is a /goto command, which compiles perfectly in pawno.
But when I go ingame and try out the command. "Usage: /goto (ID)" is always shown on the screen. No matter what I do, it only shows the Usage. I tried all IDs, even IDs that are not online, and it only shows "Usage: /goto (ID)"
This happens with all other commands that uses this stupid sscanf eg.(/ban, /kick, /spec etc...) I have tried everything to stop this problem and nothing works.
Its almost like this is a command to show me the USAGE of the command -.-
ALSO in the samp-server.exe console, it says "sscanf error: System not initialised"
But when I go ingame and try out the command. "Usage: /goto (ID)" is always shown on the screen. No matter what I do, it only shows the Usage. I tried all IDs, even IDs that are not online, and it only shows "Usage: /goto (ID)"
Код:
cmd(goto, playerid, params[]) { new targetid; new string[120]; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /goto (ID)"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_ERROR, "Invalid ID."); format(string, 120, "You have teleported to %s", PlayerInfo(targetid)); SendClientMessage(playerid, COLOR_ADMIN, string); new Float:x, Float:y, Float:z; GetPlayerPos(targetid, x, y, z); SetPlayerPos(playerid, x, y, z); SetPlayerInterior(playerid, GetPlayerInterior(targetid)); return 1; }
Its almost like this is a command to show me the USAGE of the command -.-
ALSO in the samp-server.exe console, it says "sscanf error: System not initialised"