Annoying... -
Mike Garber - 27.09.2009
Код:
if(IsPlayerAdmin(playerid) == 1) || gteam[playerid]==Team_LSPD || gteam[playerid]==Team_DMV) {
error 029: invalid expression, assumed zero x2
Код:
warning 225: unreachable code
That's the next command, so I thought It was too many brackets or something, but No, If I remove one, I get thousands of errors.
If I add one, Pawn Compiler crashes.
Код:
if(IsPlayerAdmin(playerid) == 1 || gteam[playerid]==Team_DMV || gteam[playerid]==Team_LSPD) {
:S
What's the problem with this code? I mean, It works on other commands but not right here.
And the funny thing is that I didn't change it at all, I was doing other things under another Public function...
Note: I don't wanna post the code, because It's too unique.
Re: Annoying... -
AiVAMAN - 27.09.2009
I could help you, but I cant see a part of code with my phone.

can you pastebin.com it, please?
Re: Annoying... -
Desert - 27.09.2009
The only problem i can see is
if(IsPlayerAdmin(playerid) == 1) is the wrong way to do it
if(IsPlayerAdmin(playerid)) is the way to do it
And when to check if he isnt admin add a ! infront like this
if(!IsPlayerAdmin(playerid))
Re: Annoying... -
Mike Garber - 27.09.2009
Quote:
|
Originally Posted by Desert
The only problem i can see is
if(IsPlayerAdmin(playerid) == 1) is the wrong way to do it
And when to check if he isnt admin add a ! infront like this
if(!IsPlayerAdmin(playerid))
|
I know, but It's working on the Admin commands, so It can't be the wrong way to do it....
Edit: Maybe not :S
Re: Annoying... -
Desert - 27.09.2009
Those script who does that is "Admins" that is homemade/downloaded admin scripts which when they login their admin lvl gets set to 1 etc.
In fact its just like when your making jobs. Their "faction job" gets set to 1
But this is RCON admin which is done the way as i said
Re: Annoying... -
Mike Garber - 27.09.2009
I tried your way of doing it, still gives the same error.
also;
for(new i = 0; i < MAX_PLAYERS; i++)
Код:
if (IsPlayerAdmin(i) || gteam[i]==Team_Admin || gteam[i]==Team_LSPD || gteam[i]==Team_DMV ) {
As I did the admin commands, (but now I added LSPD & DMV though), doesn't work neither.
Re: Annoying... -
Hiitch - 27.09.2009
If you want to make an admin script, either 1: make an enum that includes the admin part of it
i.e.
pawn Код:
enum pInfo {
Admin,
Money,
Score
};
new pData[MAX_PLAYERS][pInfo]
(Not sure how those work, but i've seen them alot)
or, you can make 3 stocks.
I have the stocks, but im unsure where they are at the moment, if I had them I would give you them.
but one things for sure, IsPlayerAdmin checks if the person is logged into rcon and must be used like
or, to check if the player isnt rcon admin
pawn Код:
!IsPlayerAdmin(playerid) // exclamination mark to say if he isnt an admin
Hope that helped.
Re: Annoying... -
Mike Garber - 27.09.2009
LOL I KNOW all that!
I'm not making an Admin-script.
It's a license check command, that checks if the license is valid or not.
And all commands I'm doing will be able for RCON-Administrators, that's why I'm including that.
Re: Annoying... -
Hiitch - 27.09.2009
Ok, well if you know all that, then take out the == 1 from the IsPlayerAdmin and it should work.
Re: Annoying... -
Mike Garber - 27.09.2009
I did! It still doesn't work -_-