Is this the right for when admins talk with /b ? -
ProjectAlbania - 30.12.2015
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(b, playerid, params[])
{
new Message[128], string[128];
if(Player[playerid][AdminLevel] >= 1)
{
if(sscanf(params, "z", Message))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
}
else
{
if(strlen(Message) < 1 || !IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), ""adminOrange"%s: "chatColor"((%s)) ", GetName(playerid), Message);
NearByMessage(playerid, WHITE, string);
}
}
}
}
return 1;
}
If these codes are wrong,help me...I would be greatfull!
Re: Is this the right for when admins talk with /b ? -
AndySedeyn - 30.12.2015
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) < 1 || !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.
Re: Is this the right for when admins talk with /b ? -
ProjectAlbania - 30.12.2015
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 017: undefined symbol "Player"
E:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : warning 215: expression has no effect
E:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : error 001: expected token: ";", but found "]"
E:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : error 029: invalid expression, assumed zero
E:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15310) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Re: Is this the right for when admins talk with /b ? -
ProjectAlbania - 30.12.2015
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...
Re: Is this the right for when admins talk with /b ? -
AndySedeyn - 30.12.2015
Have you got the enum that holds the player data? You're not copying everything seemingly.
Re: Is this the right for when admins talk with /b ? -
ProjectAlbania - 12.07.2016
Now, i have more experience in PAWN. I sucessfully made it. Thanks anyway!
Re: Is this the right for when admins talk with /b ? - WhiteGhost - 12.07.2016
Seriously? u Bumped a year topic for that?