Is this the right for when admins talk with /b ?
#1

I made one alone but it doesn't works.I found these codes in this forum.Does these codes works?
PHP код:
//Orange For Admin Name - F6970C ( done )
//so now this is a admin command
#define adminOrange     "{F6970C}"
#define chatGrey        "{00efad}"
command(bplayeridparams[])
{
    new 
Message[128], string[128];
    if(
Player[playerid][AdminLevel] >= 1)
    {
        if(
sscanf(params"z"Message))
        {
            
SendClientMessage(playeridWHITE"SYNTAX: /b [message]");
        }
        else
        {
            if(
strlen(Message) < || !IsPlayerConnectedEx(playerid))
            {
                return 
1;
            }
            else
            {
                if(
Player[playerid][PrisonID] == 1)
                {
                    
SendClientMessage(playeridWHITE"You may not use this channel right now.");
                }
                else
                {
                    
format(stringsizeof(string), ""adminOrange"%s: "chatColor"((%s)) "GetName(playerid), Message);
                    
NearByMessage(playeridWHITEstring);
                }
            }
        }
    }
    return 
1;

If these codes are wrong,help me...I would be greatfull!
Reply
#2

A string specifier in sscanf needs its size defined next to it:
PHP код:
if(sscanf(params"z[128]"Message)) 
What is this check for?:
PHP код:
if(strlen(Message) < || !IsPlayerConnectedEx(playerid)) 
Sscanf already deals with an empty Message parameter and checking whether or not the player who used the command is connected seems redundant to me. After all, it is the player who used the command. It's not like a command takes minutes to execute.
Reply
#3

I don't fuckin know...When i compile it as Filterscript it compiles sucessfully but in game doesn't works.I put it in gamemode it doesn't works too..This is fucking shit
When i put it in gamemode it shows this:
PHP код:
E:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : error 017undefined symbol "Player"
E:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : warning 215expression has no effect
E
:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : error 001expected token";"but found "]"
E:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : error 029invalid expressionassumed zero
E
:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply
#4

Im trying to edit all the codes,delete and everything it doesn't works...Yesterday with another codes,i tried to delete some codes,it compiled without any error but in game was a lot of buggy.Im not that good scripter,please help...
Reply
#5

Have you got the enum that holds the player data? You're not copying everything seemingly.
Reply
#6

Now, i have more experience in PAWN. I sucessfully made it. Thanks anyway!
Reply
#7

Seriously? u Bumped a year topic for that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)