Commands involving an ID.
#1

Hey guys,

Basically, I'm using a script from the Gamemodes board, and everything is running perfectly, and I strongly endeavour to use this script in my project. Nonetheless, I am experiencing some issues with the use of commands which involve an ID. For example, if I do;

/setadminlevel 1 5
[COMMAND] [ID] [ADIN LEVEL]

Instead, it'll acknowledge the command to:

/setadminlevel 0 5

It will always revert back to ID 0... Be it the setskin command, sethelper, setadminlevel, goto, acceptq, anything... I'm not sure how to fix this, so I decided to post.

Thanks.
Reply
#2

Take it from LuxAdmin/Other Systems
Reply
#3

Quote:
Originally Posted by James Coral
Посмотреть сообщение
Take it from LuxAdmin/Other Systems
Please stop replying with stupid/non-sense posts just to increase your post count.

@Syntax: I've not understand what you mean.The commands that requires an ID to perform are avalaible only on ID 0?
Reply
#4

Any ID can use the commands, providing they're the right admin and such, although, the command only works on ID 0. For example, if I'm ID 7 and I use the command /setskin on ID 9, then it wouldn't set ID 9's skin, it'd set ID 0's skin, insead.
Reply
#5

Quote:
Originally Posted by Syntax
Посмотреть сообщение
Any ID can use the commands, providing they're the right admin and such, although, the command only works on ID 0. For example, if I'm ID 7 and I use the command /setskin on ID 9, then it wouldn't set ID 9's skin, it'd set ID 0's skin, insead.
Ok get it,does this commands loop the players when performed?

If don't,it's normal.As i know,every cmd that need an ID to perform,need to loop the players:

pawn Код:
for(new i; i<MAX_PLAYERS; i++) // loops all players
    {
      //Your code here
    }
For: "Any ID can use the commands" - You've to set a variable to check if player is admin,according to your admin system.
Reply
#6

I can't find the loop in, for example, the set adin command.

And I've set the variables to check if the player is admin and such, that's all fine, the only problem there is, is that when an admin would set another person's admin level, it'll only set ID 0's... Do you have MSN or something so we could communicate a bit easier?:/
Reply
#7

Are you using SA-MP 0.3d R2?
Reply
#8

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Ok get it,does this commands loop the players when performed?

If don't,it's normal.As i know,every cmd that need an ID to perform,need to loop the players:

pawn Код:
for(new i; i<MAX_PLAYERS; i++) // loops all players
    {
      //Your code here
    }
For: "Any ID can use the commands" - You've to set a variable to check if player is admin,according to your admin system.
No, no it doesn't. Not if you already have the command (whether it be the command performer or an input from the performer).

Do you use sscanf at all? (Does the script require it?) It sounds like the classic out-dated sscanf issue. You'll need to update sscanf to the 0.3d R2 version, if you're using it.
Reply
#9

Quote:
Originally Posted by funky1234
Посмотреть сообщение
No, no it doesn't. Not if you already have the command (whether it be the command performer or an input from the performer).

Do you use sscanf at all? (Does the script require it?) It sounds like the classic out-dated sscanf issue. You'll need to update sscanf to the 0.3d R2 version, if you're using it.
When i got this similars errors (commands performed only with id 0),it's because i forget everytime to loop,otherwise try to update sscanf to latest version as suggested.
Reply
#10

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
When i got this similars errors (commands performed only with id 0),it's because i forget everytime to loop,otherwise try to update sscanf to latest version as suggested.
So you run the same code for everyone whether it's relevant or not, because you use a for player loop? Sound silly and unlogical...

All older SA-MP versions are available here: http://files.sa-mp.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)