26.09.2011, 13:23
I want to do, when an admin goes on duty it will create an 3dtextlabel which says 'ADMIN DUTY - DO NOT ATTACK' and i can't do it i dont know why it's not working ;/
please help .
please help .
PHP код:
אני רוצה שיהיה טקסט צף מעל הראש של האדמין שעולה לדיוטי ואני לא מצליח כל הזמן אני מנסה לא מצליח מנסה לא מצליח
בבקשה עזרה !!!
PHP Code:
if(strcmp(cmd, "/adminduty", true) == 0 || strcmp(cmd, "/aduty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] > 0)
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerSkin(playerid,0);
SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
SetPlayerColor(playerid,TEAM_ADMIN_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin [ID: %d] %s is now ON duty",playerid, sendername);
SendClientMessageToAll(COLOR_RED,string);
return 1;
}
else if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
SetPlayerSkin(playerid,PlayerInfo[playerid][pModel]);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerToTeamColor(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin [ID: %d] %s is now OFF duty",playerid, sendername);
SendClientMessageToAll(COLOR_WHITE,string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* You're not the admin!");
return 1;
}
}
return 1;
}
תודה