Problem with the gates!
#1

Hey, guys!
I have a problem with zcmd. So here is the code, and i have some errors:


pawn Код:
if(playerDB[playerid][admin])
    {
            CMD:fly(playerid, params[])
        {
            SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
            SendClientMessage(playerid,0xEA0000FF,"* You got Jet-Pack");
            return 1;
        }
    return 1;
    }
All I want is that only admins can use this commands. But if I put in the command fly this:
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_ORANGE,"Si komanda tik administracijai.");
and when I go into game and type that command it says this command is only for admin. I am admin in this server
Here is the error:
pawn Код:
D:\GTASA~1\ghjhj\GAMEMO~1\band7.pwn(17658) : error 010: invalid function or declaration
D:\GTASA~1\ghjhj\GAMEMO~1\band7.pwn(17662) : error 054: unmatched closing brace ("}")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Whats the problem? Could you help me? Thanks
Sorry for my bad english
Reply
#2

You insert two commands with ZCMD proccesor into this. You can't do that.
Show us some other part of the code because I can't understand what you exactly want to do.
Reply
#3

I just want that for example only admin can open gates. Can you do that for me? Sorry for my bad english.
Reply
#4

So anyone could help me?
Reply
#5

Remove that PlayerDB thing.. Change your accounts system or something.
With RCON this /fly command should look like this:

pawn Код:
CMD:fly(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_ORANGE,"Si komanda tik administracijai.");
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USE JETPACK);
    SendClientMessage(playerid,0xEA0000FF,"* You got Jet-Pack");
    return 1;
}
Reply
#6

You dont have to change the whole account system, well for me it is a lot more easier with PlayerDB



PS: lietuviski gm skiriasi nuo anglisku, geriau rasytum i lt foruma
Reply
#7

Quote:
Originally Posted by FreshDoubleX
Посмотреть сообщение
Remove that PlayerDB thing.. Change your accounts system or something.
With RCON this /fly command should look like this:

pawn Код:
CMD:fly(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_ORANGE,"Si komanda tik administracijai.");
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USE JETPACK);
    SendClientMessage(playerid,0xEA0000FF,"* You got Jet-Pack");
    return 1;
}
When i go to the server it says this command is only for admins, but I am admin in that server. So what is it wrong? Maybe there is other ways?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)