Admin commands not working
#1

Hello, so i've a big problem.

My admin commands (EVERY) doesn't work when there are 2 admins online.

Let me explain:

I'm id 0 and i use admin commands against other id's,everything works.

Another admin join and he's id 1,he tries admin commands and doesn't work!

Seems they're affected about the id 0 bug but my sscanf is updated and zcmd too.

What can i do?
Reply
#2

any code =)?
Reply
#3

Do i really need to paste all the admin commands?

They don't work just the commands that requires params, like /goto - /get - /astats etc.Other commands with a loop works perfectly.
Reply
#4

Show /goto?
Reply
#5

pawn Код:
CMD:goto(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 2)
    {
    new targetid, string[128];
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, red, "Usage: /goto [PlayerID/Name]");
    if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ORANGE, "Enter a valid player ID/name!");
    else
    {
        new pName[24];
        GetPlayerName(targetid,pName,128);
        new aName[24];
        GetPlayerName(playerid,aName,128);
        format(string, sizeof(string), "You succesfully teleported to %s [%d]",pName,targetid);
        SendClientMessage(playerid,red,string);
        SetPlayerInterior(playerid,GetPlayerInterior(targetid));
        new Float:TeleX, Float:TeleY, Float:TeleZ;
        GetPlayerPos(targetid, TeleX, TeleY, TeleZ);
        SetPlayerPos(playerid, TeleX, TeleY, TeleZ+1);
        PutPlayerInVehicle(playerid,targetid,1);
        new msg[128];
        format(msg, sizeof(msg), "0,4Admin %s (%d) has teleported to %s (%d)", aName,playerid, pName, targetid);
        IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
        return true;
    }
    }
    else return 0;
}
Reply
#6

I think you have to recheck if you really use the newest version of sscanf, people make often the same fault, they quickly download the plugin upload it and often they forget to do something.
So download the newest version, copy it to your includes,
Run pawno.exe inside the pawno folder as admin, open your gamemode, compile it.
Upload the newest version files to your server , and restart.
Reply
#7

Why return 0? Try changing it to return 1;
Reply
#8

Roel, seems working now
newbienoob doesn't need, the cmds works even with retun 0
Reply
#9

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Why return 0? Try changing it to return 1;
Having return 0; in custom commands (zcmd, ycmd, etc) won't affect your commands AFAIK, because commands are callbacks defined via a special macro. As long as the command is coded properly.
Reply
#10

The main cause for ID bug , is outdated SSCANF
Get the new one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)