Admin commands not working -
Face9000 - 15.10.2012
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?
Re: Admin commands not working -
~Pawno~ - 15.10.2012
any code =)?
Re: Admin commands not working -
Face9000 - 15.10.2012
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.
Re: Admin commands not working -
newbienoob - 15.10.2012
Show /goto?
Re: Admin commands not working -
Face9000 - 15.10.2012
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;
}
Re: Admin commands not working -
Roel - 15.10.2012
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.
Re: Admin commands not working -
newbienoob - 15.10.2012
Why return 0? Try changing it to return 1;
Re: Admin commands not working -
Face9000 - 15.10.2012
Roel, seems working now
newbienoob doesn't need, the cmds works even with retun 0
Re: Admin commands not working - Emmet_ - 15.10.2012
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.
Re: Admin commands not working -
Pureem - 15.10.2012
The main cause for ID bug , is outdated SSCANF
Get the new one