Help in cmd
#1

i need help in /admins cmd i need this cmd show online admin's

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <PointToPoint>
#include <streamer>
#include <dutils>
#include <Dini>
#include <clothes>
#include <zones>
#include <utils>
#include <vehicles>
#include <diners>
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_RED 0xFF0000FF
#define COLOR_LRED 0xFF4747FF
#define COLOR_GREEN 0x00FF00FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_LBLUE 0x99FFFFFF
#define COLOR_ORANGE 0xFF9900FF
#define COLOR_PURPLE 0xCC00DDFF
#define COLOR_PEACH 0xFFCC66FF
#define COLOR_SILVER 0xDDDDDDFF
#define COLOR_WANTEDBLUE 0x0055CCFF
#define COLOR_DARK_VIOLET 0x9400D3FF
#define COLOR_SUPPORT 0x00E5EEFF
#define COLOR_ADMIN 0x0066FFFF
#define COLOR_PLAYER 0xFFFF33FF
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Admin command");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Admins command");
    print(
"----------------------------------\n");
}
#endif
    
if (strcmp(string"/admins"true) == 0)
    {
        if (
playedtime[playerid][0] < 10)
            return 
SendClientMessage2(playeridCOLOR_SILVER"Your playing time must be more than 10 hours to check the admin list.");
        
SendClientMessage(playeridCOLOR_GREEN "Server Owner -.");
    
SendClientMessage(playeridCOLOR_RED "Head Administrators -.");
    
SendClientMessage(playeridCOLOR_ADMIN "Lead Administrators -.");
    
SendClientMessage(playeridCOLOR_LBLUE "Senior Administrator -.");
    
SendClientMessage(playeridCOLOR_ORANGE "Administrator -.");
    return 
1;
    } 
PHP код:
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(59) : error 010invalid function or declaration
E
:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(61) : error 010invalid function or declaration
E
:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(62) : error 010invalid function or declaration
E
:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(68) : error 010invalid function or declaration
E
:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"bandanas"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"bandanatext"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"caps"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"captext"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"glasses"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"glassestext"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"hats"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"hattext"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"helmets"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"helmettext"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"masks"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"masktext"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"watches"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"watchtext"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"zonenames"
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\admin2.pwn(70) : warning 203symbol is never used"zonetype"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply
#2

please reply
Reply
#3

The warnings has definitely nothing to do with the cmd.
We have to know on which line the errors are
Reply
#4

The command has to be placed underneath "OnPlayerCommandText", there's a wiki page with an example of how it should look:
https://sampwiki.blast.hk/wiki/OnPlayerCommandText

You could also use zcmd which makes it easier to create commands.

Symbol is never used warnings are just because you've declared variables somewhere you don't use, like
"new zonetype" but you don't actually use it, those warnings wont do anything though.
Reply
#5

Thx
Reply
#6

I need help . I have a script and i get a error cannot read from file : "diners'' and "clothes" . i searched whole net but i couldn't find these 2 includes . Help me out!
Please give me the links !
Reply
#7

Quote:
Originally Posted by siddharth052003
Посмотреть сообщение
I need help . I have a script and i get a error cannot read from file : "diners'' and "clothes" . i searched whole net but i couldn't find these 2 includes . Help me out!
Please give me the links !
As far I know, The includes named as "Diners" and "Clothes" never exist, show us your code, probably someone renamed the actual include to "Diners" and "clothes".
Reply
#8

Quote:
Originally Posted by BlackbirdXd
Посмотреть сообщение
As far I know, The includes named as "Diners" and "Clothes" never exist, show us your code, probably someone renamed the actual include to "Diners" and "clothes".
Not needed, it's not the reason there is an error in this.
Reply
#9

Okay I removed those includes lines from the script but now i get many errors .

F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(150) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(150) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(151) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(151) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(152) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(152) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(154) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(154) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(157) : error 017: undefined symbol "VEHICLES"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(157) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(15 : error 017: undefined symbol "VEHICLES"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(15 : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(169) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(169) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(170) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(170) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(171) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(171) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(172) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(172) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(173) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(173) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(175) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(175) : error 009: invalid array size (negative, zero or out of bounds)
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(176) : error 017: undefined symbol "PLAYERS"
F:\Home\Siddharth\Best Games\Reallife Freeroam - Roleplay\gamemodes\bb_freeroam.pwn(176) : error 009: invalid array size (negative, zero or out of bounds)

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


26 Errors.

The Script Lines In Which The Error Is Showing -

new Text3D:RPLabel[PLAYERS + 1];
new osskin[PLAYERS];
new ropping[PLAYERS];
new rope[MAX_ROPES];
new TazerOn[PLAYERS];
new countp=0;
new bool: isRelogging[MAX_PLAYERS];
new obj3[VEHICLES];
new obj4[VEHICLES];
new Rocket[MAX_LAUNCH];
new RocketLight[MAX_LAUNCH];
new RocketSmoke[MAX_LAUNCH];
new RocketExplosions[MAX_LAUNCH];
new Float:rx[MAX_LAUNCH];
new Float:ry[MAX_LAUNCH];
new Float:rz[MAX_LAUNCH];
new FireworkTotal;
new Fired;

new Text3D:Labels[PLAYERS];
new sconv[PLAYERS];
new didnotcollectdrugs[PLAYERS];
new orderd[PLAYERS];
new IsFrozen[PLAYERS];
new orderedfordrugs[MAX_PLAYERS];
new gPlayerCheckpointStatus[PLAYERS];
new gPlayerRaceCheckpointStatus[PLAYERS];
Reply
#10

I was meaning that what he'd said wasn't needed (The includes could be custom, and they wouldn't exist in anyones searches). Not that the includes didn't matter.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)