OnPlayerCommandPerformed
#1

~fixed~
Reply
#2

pawn Код:
if(pInfo[playerid][pAdminLevel] >= 1)
is checking to see if the admin level is greater than or equal to one. If it is, then it sends a message to the admins about the command used.

If you want it to only show commands used by players, change that check to see if the admin level equals 0.
Reply
#3

~fixed~
Reply
#4

Apparently you never studied math.

> means GREATER THAN
< means LESS THAN
= means EQUAL TO

The first piece of code will check if the admin level is greater than or equal to 0. This is not what you want. The second piece of code will check if the admin level is greater than 0. This is not what you want.

What you want is to see if the admin level EQUALS 0; you can do this by using the = sign (or more accurately, since this is PAWN, ==). Try again!
Reply
#5

pawn Код:
if(pInfo[playerid][pAdminLevel] == 0 )
As you need it to check to see if the admin level equals 0.

EDIT: Too late. Anyway, check the operators here https://sampwiki.blast.hk/wiki/Control_Structures
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)