SA-MP Forums Archive
[HELP]Neon Admin System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]Neon Admin System (/showthread.php?tid=289542)



[HELP]Neon Admin System - Kazuo - 12.10.2011

Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {
            if (strcmp(cmdtext, "/takeneon", true)==0)
            {
            if(IsPlayerInAnyVehicle(playerid))
            {
        ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nSpecial[Red]\nSpecial[Green]\nSpecial[Blue]\nDellete Neon[By:wizzi]", "Select", "Cancel");
            }
            return 1;
            }
            return 0;
    }
please how to add this command, the command admin . Please help me ..
Neon By : wizzi


Re: [HELP]Neon Admin System - Yamoo - 12.10.2011

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {
            if (strcmp(cmdtext, "/takeneon", true)==0)
            {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
            if(IsPlayerInAnyVehicle(playerid))
            {
        ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nSpecial[Red]\nSpecial[Green]\nSpecial[Blue]\nDellete Neon[By:wizzi]", "Select", "Cancel");
            }
            return 1;
            }
            return 0;
    }
Should do the job.


Re: [HELP]Neon Admin System - Kazuo - 12.10.2011

Quote:
Originally Posted by Yamoo
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {
            if (strcmp(cmdtext, "/takeneon", true)==0)
            {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
            if(IsPlayerInAnyVehicle(playerid))
            {
        ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nSpecial[Red]\nSpecial[Green]\nSpecial[Blue]\nDellete Neon[By:wizzi]", "Select", "Cancel");
            }
            return 1;
            }
            return 0;
    }
Should do the job.
thanks bro


Re: [HELP]Neon Admin System - Kazuo - 12.10.2011

Quote:
Originally Posted by Yamoo
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {
            if (strcmp(cmdtext, "/takeneon", true)==0)
            {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
            if(IsPlayerInAnyVehicle(playerid))
            {
        ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nSpecial[Red]\nSpecial[Green]\nSpecial[Blue]\nDellete Neon[By:wizzi]", "Select", "Cancel");
            }
            return 1;
            }
            return 0;
    }
Should do the job.
bro , check
Код:
C:\Users\Aziz\Desktop\SLRP\filterscripts\neon.pwn(37) : error 017: undefined symbol "PlayerInfo"
C:\Users\Aziz\Desktop\SLRP\filterscripts\neon.pwn(37) : warning 215: expression has no effect
C:\Users\Aziz\Desktop\SLRP\filterscripts\neon.pwn(37) : error 001: expected token: ";", but found "]"
C:\Users\Aziz\Desktop\SLRP\filterscripts\neon.pwn(37) : error 029: invalid expression, assumed zero
C:\Users\Aziz\Desktop\SLRP\filterscripts\neon.pwn(37) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Why ?


Re: [HELP]Neon Admin System - Super_Panda - 12.10.2011

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {
            if (strcmp(cmdtext, "/takeneon", true)==0)
            {
            if(IsPlayerAdmin(playerid))
            {
            if(IsPlayerInAnyVehicle(playerid))
            {
        ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nSpecial[Red]\nSpecial[Green]\nSpecial[Blue]\nDellete Neon[By:wizzi]", "Select", "Cancel");
            }
            return 1;
            }
            return 0;
    }



AW: Re: [HELP]Neon Admin System - Drebin - 13.10.2011

Quote:
Originally Posted by Super_Panda
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {
            if (strcmp(cmdtext, "/takeneon", true)==0)
            {
            if(IsPlayerAdmin(playerid))
            {
            if(IsPlayerInAnyVehicle(playerid))
            {
        ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nSpecial[Red]\nSpecial[Green]\nSpecial[Blue]\nDellete Neon[By:wizzi]", "Select", "Cancel");
            }
            return 1;
            }
            return 0;
    }
Be careful.
IsPlayerAdmin(); checks if a player is logged in into RCON.