Posts: 3,351
Threads: 780
Joined: Jan 2010
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?
Posts: 3,351
Threads: 780
Joined: Jan 2010
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.
Posts: 3,351
Threads: 780
Joined: Jan 2010
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;
}
Posts: 727
Threads: 79
Joined: Mar 2012
Reputation:
0
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.
Posts: 1,534
Threads: 129
Joined: Jan 2012
Reputation:
0
Why return 0? Try changing it to return 1;
Posts: 3,351
Threads: 780
Joined: Jan 2010
Roel, seems working now

newbienoob doesn't need, the cmds works even with retun 0
Posts: 32
Threads: 0
Joined: Oct 2012
Reputation:
0
The main cause for ID bug , is outdated SSCANF
Get the new one