sscanf not allowing commands to work
#1

Well, I made a admin system using sscanf and zcmd, but it keeps sending SERVER: Unknown command. We have a return for Server Unknown Command, but this isnt the problem. It sends Player Is not connected, but when we enter a VALID playerid, it says SERVER unknown command. Yet our little test command CMD:debug, works fine!

Any suggestions.

Heres the /makeadmin code, and the /debug code.

This code doesnt work
PHP код:
CMD:makeadmin(playeridparams[])
{
    new 
playerbstring[256], string1[256], level;
    if(
pInfo[playerid][Admin] < && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"IT NO WORK FFS");
    if (
sscanf(params"ui"playerblevel)) return SendClientMessage(playerid, -1"Usage: /makeadmin [Playerid/part of name] [Level]");
    if(!
IsPlayerConnected(playerb)) return SendClientMessage(playeridCOL_ERROR"ERROR: That player is not connected!");
    if(
level && level 1337) return SendClientMessage(playeridCOL_ERROR"ERROR: Invalid level(Use level 1-4)");
    
pInfo[playerb][Admin] = level;
    
format(stringsizeof(string), "You have made %s a level %i Admin!"GetName(playerb), level);
    
SendClientMessage(playeridCOL_HELPERstring);
    
format(string1sizeof(string1), "%s has made you a level %i Admin!"GetName(playerid), level);
    
SendClientMessage(playerbCOL_HELPERstring1);
//    mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `Admin`=%d WHERE `id`=%d", pInfo[playerb][pAdmim], pInfo[playerb][pID]);
//    mysql_tquery(mysql, query);
    
return 1;

Yet this does?
PHP код:
CMD:debug(playeridparams[])
{
    
SendClientMessage(playerid, -1"Test complete == DO YOU SEE THIS MESSAGE?!");
    return 
1;

The only conclusion I can gather is that its because the debug doesnt use sscanf?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)