SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 04/01/2012, 07:59 PM   #1
Setkus
Big Clucker
 
Setkus's Avatar
 
Join Date: Oct 2010
Location: Lithuania
Posts: 127
Reputation: 0
Default Help with admin!

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


pawn Code:
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 Code:
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 Code:
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
__________________
Well, have a nice day!

Los Santos: 82.135.230.10:1111

Last edited by Setkus; 05/01/2012 at 05:56 PM. Reason: Help with admin!
Setkus is offline   Reply With Quote
Old 04/01/2012, 08:07 PM   #2
Konstantinos
Godfather
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 8,942
Reputation: 832
Default Re: Problem with the gates!

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.
Konstantinos is offline   Reply With Quote
Old 04/01/2012, 08:10 PM   #3
Setkus
Big Clucker
 
Setkus's Avatar
 
Join Date: Oct 2010
Location: Lithuania
Posts: 127
Reputation: 0
Default Re: Problem with the gates!

I just want that for example only admin can open gates. Can you do that for me? Sorry for my bad english.
__________________
Well, have a nice day!

Los Santos: 82.135.230.10:1111
Setkus is offline   Reply With Quote
Old 05/01/2012, 09:31 AM   #4
Setkus
Big Clucker
 
Setkus's Avatar
 
Join Date: Oct 2010
Location: Lithuania
Posts: 127
Reputation: 0
Default Re: Problem with the gates!

So anyone could help me?
__________________
Well, have a nice day!

Los Santos: 82.135.230.10:1111
Setkus is offline   Reply With Quote
Old 05/01/2012, 10:08 AM   #5
FreshDoubleX
Big Clucker
 
FreshDoubleX's Avatar
 
Join Date: Nov 2010
Location: Estonia
Posts: 171
Reputation: 2
Default Re: Problem with the gates!

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

pawn Code:
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;
}
__________________

Be Happy !
FreshDoubleX is offline   Reply With Quote
Old 05/01/2012, 10:22 AM   #6
The God
Big Clucker
 
Join Date: Jun 2011
Posts: 65
Reputation: -2
Default Re: Problem with the gates!

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
The God is offline   Reply With Quote
Old 05/01/2012, 05:53 PM   #7
Setkus
Big Clucker
 
Setkus's Avatar
 
Join Date: Oct 2010
Location: Lithuania
Posts: 127
Reputation: 0
Default Re: Problem with the gates!

Quote:
Originally Posted by FreshDoubleX View Post
Remove that PlayerDB thing.. Change your accounts system or something.
With RCON this /fly command should look like this:

pawn Code:
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?
__________________
Well, have a nice day!

Los Santos: 82.135.230.10:1111
Setkus is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[PROBLEM] Gates Script Help Dodo9655 Help Archive 1 29/01/2011 05:00 PM
Moving gates problem 3 ! Kirchhoff Help Archive 21 12/04/2010 08:04 PM
[Help]Area 51 Gates Problem Tigerbeast11 Help Archive 15 25/10/2009 09:06 AM
[HELP]Problem with gates krisko Help Archive 1 11/08/2009 08:50 PM
Gates problem [FIXED] Burridge Help Archive 2 12/05/2009 03:16 PM


All times are GMT. The time now is 10:46 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.