Help Ppc Admin system scripts -
BanSilog - 09.05.2018
Heres some screen shot how to add admin rank name in chat
https://imgur.com/a/4etnsXY
Re: Help Ppc Admin system scripts -
BanSilog - 09.05.2018
ANYONE PLEASE?
Re: Help Ppc Admin system scripts -
Maxandmov - 09.05.2018
What are you trying to do? Are you trying to add an admin rank next to one's name if he's an admin on duty?
Re: Help Ppc Admin system scripts -
BanSilog - 09.05.2018
no /duty and no off duty directly that and i want that admin if you chat your level admin rank pop up in chat
Re: Help Ppc Admin system scripts -
Maxandmov - 09.05.2018
Then, you format the text being sent in OnPlayerText callback:
Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pAdmin] > 0 ) // I'll assume you have player data regarding admin rank;
{
new str[512]; //I am not sure which length you need here; you might want to search about that yourself.
format(str, sizeof(str), "[%s] %s: %s", GetAdminRankName(playerid), GetPlayerName(playerid), text); //Where GetAdminRankName(playerid) is a stock that returns you your rank name depending on your admin rank
//Send your message here whichever way you usually do it
return 0; //we prevent the usual message from being sent
}
return 1;//In other case, we just send the text as usual
}
...
stock GetAdminRankName(playerid)
{
new str[32];
switch(PlayerInfo[playerid][pAdmin])
{
case 1: str = "Admin rank name 1"
...
}
return str;
}
You get the general idea I guess.
Re: Help Ppc Admin system scripts -
BanSilog - 09.05.2018
D:\ROOT FOLDER WAG DELETE\gamemodes\PPC_Trucking.pwn(1465) : error 029: invalid expression, assumed zero
D:\ROOT FOLDER WAG DELETE\gamemodes\PPC_Trucking.pwn(1465) : error 017: undefined symbol "text"
D:\ROOT FOLDER WAG DELETE\gamemodes\PPC_Trucking.pwn(1467) : error 017: undefined symbol "PlayerInfo"
D:\ROOT FOLDER WAG DELETE\gamemodes\PPC_Trucking.pwn(1467) : warning 215: expression has no effect
D:\ROOT FOLDER WAG DELETE\gamemodes\PPC_Trucking.pwn(1467) : error 001: expected token: ";", but found "]"
D:\ROOT FOLDER WAG DELETE\gamemodes\PPC_Trucking.pwn(1467) : error 029: invalid expression, assumed zero
D:\ROOT FOLDER WAG DELETE\gamemodes\PPC_Trucking.pwn(1467) : fatal error 107: too many error messages on one line
Re: Help Ppc Admin system scripts -
BanSilog - 10.05.2018
ANYONE HELP ME? PLEASE
Re: Help Ppc Admin system scripts -
FaLLenGirL - 10.05.2018
Quote:
Originally Posted by BanSilog
ANYONE HELP ME? PLEASE
|
@Maxandmov already told you how to do it. Solve that errors, are not that hard to solve.
These errors are too common, you should have known how to solve them.
Quote:
Originally Posted by Maxandmov
You get the general idea I guess.
|
He doesn't :]].
Re: Help Ppc Admin system scripts -
BanSilog - 11.05.2018
Quote:
Originally Posted by FaLLenGirL
@Maxandmov already told you how to do it. Solve that errors, are not that hard to solve.
These errors are too common, you should have known how to solve them.
He doesn't :]].
|
I do not know why you're just so selfish that I know I need to learn but that's not what I'm supposed to want to be with you and of course I'm starting to know you do not know how to understand me for yourself take you
sorry if I said that's why it's bad for me to ask for bad help? I feel better when you help me than I'm right and I know that I have to learn but I try hard to learn
Re: Help Ppc Admin system scripts -
FaLLenGirL - 11.05.2018
Quote:
Originally Posted by BanSilog
I do not know why you're just so selfish that I know I need to learn but that's not what I'm supposed to want to be with you and of course I'm starting to know you do not know how to understand me for yourself take you
sorry if I said that's why it's bad for me to ask for bad help? I feel better when you help me than I'm right and I know that I have to learn but I try hard to learn
|
I am not selfish. I'm too kind sometimes with some people from here, and they don't really deserve help, because they use a ugly lang with us and they think that we'll do their job and they will just copy it. So if i seemed to be selfish or rude with you, I am sorry, I am just tired of people like them. I edited a little bit @Maxandmov code, i hope this will help you to get it right:
PHP код:
public OnPlayerText( playerid, text[ ] )
{
SetPlayerChatBubble( playerid, text, 0xFFFFFFFF, 100.0, 10000 );
if( PlayerInfo[ playerid ][ pAdmin ] > 0 )
{
new str[ 512 ];
format( str, sizeof( str ), "[%s] %s: %s", GetAdminRankName( playerid ), GetPlayerName( playerid ), text );
return 0;
}
return 1;
}
stock GetAdminRankName( playerid )
{
new str[ 32 ];
switch( PlayerInfo[ playerid ][ pAdmin ] )
{
case 1: str = "Rank 1";
case 2: str = "Rank 2";
case 3: str = "Rank 3";
case 4: str = "Rank 4";
case 5: str = "Rank 5";
case 6: str = "Rank 6";
//you can add more if you want
}
return str;
}
* Also: "
PlayerInfo" doesn't exist because this enum in your GM/FS is named different. Maybe "
pInfo" or etc, this
enum is used to save player variables, put in the code above your enum name.