Problem(error/warning): Kako napraviti da ako je npr igrac Admin i ukuca nesto u IC, da izadje ono sto stavimo npr ADMIN OOC : Pa ime pa text
Dio skripte:Napisite sta treba tocno,poslat cu
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log)://
Slika/video ingame problema(obavezno ako je ingame problem): ako treba slikat cu
pod public onplayertext pravis to
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new string[128];
format(string, sizeof(string), """CRNA"((Admin))]BIJELA"%s kaze"BIJELA": %s", GetName(playerid), text);
foreach( new i : Player)
if( IsPlayerNearPlayer( 25.0, playerid, i ) )
{
SCM( i, -1, string );
}
return 1;
}
eto samo definisi gore kako je tebi enum za admina i ove boje
new buffer[128],
rank = 0,
Float: x,
Float: y,
Float: z;
if (PlayerInfo[playerid][pAdmin]) rank = 1;
else if (PlayerInfo[playerid][pGM]) rank = 2;
GetPlayerPos(playerid, x, y, z);
format(buffer, sizeof buffer, "%s%s kaze: %s", (rank == 1) ? ("Admin OOC ") : ((rank == 2) ? ("GM OOC ") : ("")), GetName(playerid), text);
foreach(new i : Player) {
if (IsPlayerInRangeOfPoint(i, 20.0, x, y, z)) SendClientMessage(i, -1, buffer);
}