Detaljan opis problema: Stavio sam kada Admini i GM-ovi ukucaju /aon i /gmon da im se pojavi iznad glave onaj text. Sve radi,samo ima jedan problem. Cesto se desi da obicni igraci imaju ispisan taj text iznad glave..
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Evo cijela komanda /aon /aoff /gmon i /gmoff
CMD:aon(playerid, params[])
{
if(PlayerInfo >= 1 && GetPVarInt(playerid, "ADuty") == 0)
{
SetPVarInt(playerid, "ADuty", 1);
new sMsg[ 128 ];
GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
//SetPlayerColor(playerid, 0xE30000FF);
D_SetPlayerHealth(playerid,200.0);
SetPlayerArmour(playerid,100.0);
SendClientMessage(playerid, 0xE30000FF, "Sada si Admin On Duty !");
new Float:fa, Float:fy, Float:fu;
GetPlayerPos( playerid, fa, fy, fu );
adminnaduznosti = Create3DTextLabel("Admin Na duznosti! NE ometaj!",COLOR_LIGHTBLUE,0,0,0,50,-1,50);
Attach3DTextLabelToPlayer(adminnaduznosti, playerid, 0,0,0);
}
return 1;
}
CMD:aoff(playerid, params[])
{
if(PlayerInfo >= 1 && GetPVarInt(playerid, "ADuty") == 1)
{
SetPVarInt(playerid, "ADuty", 0);
new sMsg[ 128 ];
GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
SetPlayerColor(playerid, COLOR_WHITE);
D_SetPlayerHealth(playerid,100.0);
SetPlayerArmour(playerid,0.0);
SendClientMessage(playerid, 0xB30000FF, "Nisi vise Admin On Duty !");
Delete3DTextLabel(adminnaduznosti); // brisanje 3d labela..
}
return 1;
}COMMAND:gmon(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo >= 1 && GetPVarInt(playerid, "GMDUTY") == 0)
{
new sMsg[ 128 ];
SetPVarInt(playerid, "GMDUTY", 1);
GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
SetPlayerColor( playerid, 0x0984C2FF );
D_SetPlayerHealth(playerid, 250);
SetPlayerArmour(playerid, 250);
format( sMsg, sizeof( sMsg ), "GameMaster %s je sada na duznosti.", sMsg );
SendClientMessageToAll( 0x0984C2FF, sMsg );
SendClientMessage(playerid, 0x000040FF, "Sada si GameMaster On Duty !");
gmnaduznosti = Create3DTextLabel("GameMaster na duznosti! NE ometaj!",COLOR_GREEN,0,0,0,50,-1,50);
Attach3DTextLabelToPlayer(gmnaduznosti, playerid, 0,0,0);
}
}
return 1;
}
COMMAND:gmoff(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo >= 1 && GetPVarInt(playerid, "GMDUTY") == 1)
{
new sMsg[ 128 ];
SetPVarInt(playerid, "GMDUTY", 0);
GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME);
SetPlayerColor( playerid, COLOR_WHITE );
D_SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
format( sMsg, sizeof( sMsg ), "GameMaster %s vise nije na duznosti.", sMsg );
SendClientMessageToAll( 0x0984C2FF, sMsg );
SendClientMessage(playerid, 0x000040FF, "Sada si GameMaster Off Duty !");
Delete3DTextLabel(gmnaduznosti); // brisanje 3d labela..
}
}
return 1;
}Ne znam je li problem u ovome ali eto sam postao za svaki slucaj.
Ako neko zna,bio bih zahvalan na pomoci.
