09.05.2018, 03:18
Help Ppc Admin system scripts
09.05.2018, 09:32
ANYONE PLEASE?
09.05.2018, 09:50
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?
09.05.2018, 09:53
no /duty and no off duty directly that and i want that admin if you chat your level admin rank pop up in chat
09.05.2018, 10:11
Then, you format the text being sent in OnPlayerText callback:
You get the general idea I guess.
Код:
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; }
09.05.2018, 11:22
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
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
10.05.2018, 17:27
(
Последний раз редактировалось BanSilog; 10.05.2018 в 19:38.
)
ANYONE HELP ME? PLEASE
10.05.2018, 21:01
@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 :]].
These errors are too common, you should have known how to solve them.
He doesn't :]].
11.05.2018, 00:24
Quote:
@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 :]]. |
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
11.05.2018, 20:59
Quote:
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 |
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;
}
enum is used to save player variables, put in the code above your enum name.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)