weird problem with commands
#1

Okay, so if i don't /login it will tell me "You can't use commands before u login bla bla blah"

after i login and spawn if i do /jail, /slap no matter what level i am it says i don't have the privilege to use this command..

I don't know which code do i need to show since it's with all my commands.. do i need 1 command to show for example?
Reply
#2

I take it you're setting an enum when they login? If so, make sure it's being set by debugging.
Reply
#3

What do you mean? i only have Logged, and AdminLevel,
Reply
#4

sorry for bumping but i have to go tomorrow for a trip.. can anyone help?
Reply
#5

Quote:
Originally Posted by Glossy42O
Посмотреть сообщение
Okay, so if i don't /login it will tell me "You can't use commands before u login bla bla blah"

after i login and spawn if i do /jail, /slap no matter what level i am it says i don't have the privilege to use this command..

I don't know which code do i need to show since it's with all my commands.. do i need 1 command to show for example?
I think you are not saving the Admin level correctly.
Reply
#6

Can you show us one of your Commands(That you need a certain level to use it) Code
Reply
#7

PHP код:
CMD:freeze(playeridparams[])
{
  if(
pInfo[playerid][AdminLevel] >= 1) return SendClientMessage(playerid, -1"{FF0000}[SYSTEM ERROR]: You don't have the privilege to use that command.");
  {
      new 
idname[128], string[128];
      if(
pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, -1"{FF0000}[SYSTEM[: {FFFFFF}You have to login before you can use commands !");
      if(
sscanf(params"u"id)) return SendClientMessage(playerid, -1"{FF0000}[SYSTEM ERROR]: {FFFFFF}USAGE: /freeze [id]");
      if(!
IsPlayerConnected(id)) return SendClientMessage(playerid, -1"{FF0000}[SYSTEM ERROR]: The ID you have inputted is incorrect !");
      
PlayerPlaySound(playerid,6400,0.0,0.0,0.0);
      
TogglePlayerControllable(id0);
      
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
      
format(string,sizeof string,"You have freezed %s",name);
      
SendClientMessageToAll(-1string);
      
format(string,sizeof string"{FF0000}[SYSTEM]: You have been frozen by {FFFF00}%s",name);
  }
  return 
1;

Reply
#8

You should be logged and an admin, show us the code where you login and make yourself an admin
Reply
#9

show us onplayerspawn and onplayerdisconnect
Reply
#10

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
You should be logged and an admin, show us the code where you login and make yourself an admin
man do u even read what i said? "no matter what level i am it says i don't have the privilege to use this command.."

Quote:
Originally Posted by Wizzard2H
Посмотреть сообщение
show us onplayerspawn and onplayerdisconnect
PHP код:
public OnPlayerDisconnect(playerid,reason)
{
    
pInfo[playerid][Logged] = 0;
    return 
1;

and i don't have on spawn
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)