08.07.2010, 09:54
in gamemode how i make command like normal player not admin type command and admins see message i write it with player name and id how ??/
if(!strcmp(cmdtext,"/want",true)) { SendClientMessage(playerid,0xE100E1FF,"|Your Order Send to admins|"); format(string, sizeof(string), "%s\"(id: %d) Want to be an admin",name,playerid); SendClinetMessageToAdmins(COLOR_GREY,string);print(string); } return 1; }
help me help me
if(!strcmp(cmdtext,"/want",true))
{
new name[MAX_PLAYER_NAME],String[128]; GetPlayerName(playerid,name,MAX_PLAYER_NAME);
if(IsPlayerAdmin(playerid)) {return SendClientMessage(playerid,COLOR,"You are already an admin!");}// Checks if the player is already RCON admin
else for(new a = 0; a < MAX_PLAYERS; a++) // Loop
{
if(IsPlayerAdmin(a) && IsPlayerConnected(a))// Checking if there's any admin connected online
{
format(String,sizeof(String),"%s(ID: %d) wants to be an admin!",name,playerid);
SendClientMessage(a,COLOR,String); //Sending the message to the admins that are online
SendClientMessage(playerid,COLOR,"Your request have been sent."); //Telling the player
}
}
return 1;
}