19.12.2017, 08:58
Код:
CMD:aduty(playerid,params[]) //Doesnt need params function { if(PlayerInfo[playerid][Level] >=1 || IsPlayerAdmin(playerid)) //If you use rcon admin delete (PlayerInfo[playerid][pAdmin] >=1 || { if (adminDuty[playerid] == 0) //Check if player is on duty { new Float:x,Float:y,Float:z; new Text3D:label = Create3DTextLabel("Admin On Duty!", COLOR_RED,x,y,z, 40.0, 0, 0); //Creates 3d text label at player position GetPlayerPos(playerid,x,y,z); //Looks for players position SetPlayerHealth(playerid,100000); //makes player godmode SetPlayerColor(playerid,COLOR_RED); //set admin colour red SetPlayerSkin(playerid,217); //set admin skin to 294 GivePlayerWeapon(playerid,38,0); new string[128]; format(string, sizeof(string), "{FF0000} %s is now on Duty!", PlayerName2(playerid), params[0] ); //here you format string to send to players SendClientMessageToAll(COLOR_RED,string); //send string to players SendClientMessage(playerid,COLOR_BLUE,"You are now on duty!"); //Tell admin he is now on duty Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7); //attach 3d text label made before to player adminDuty[playerid] = 1; //Set player on duty } else if (adminDuty[playerid] == 1) //Check if player is on duty { new Float:x,Float:y,Float:z; new Text3D:label = Create3DTextLabel("Admin On Duty!", COLOR_RED,x,y,z, 40.0, 0, 0); Delete3DTextLabel(label); //Delete 3d text label saying "Admin On Duty!" SetPlayerHealth(playerid,100); //sets player health back to 100 new string[128]; format(string, sizeof(string), "{FF0000} %s is now off Duty!", PlayerName2(playerid), params[0] ); //Format string to send to players SendClientMessageToAll(COLOR_RED,string); //send players string SendClientMessage(playerid,COLOR_BLUE,"You are now off duty!"); //send admin message he is off duty adminDuty[playerid] = 0; //sets admin off duty ForceClassSelection(playerid); SetPlayerHealth(playerid, 0); } } else SendClientMessage(playerid,COLOR_RED,"You are not high level enough!"); //Error message to send to players who arent admins return 1; }
when admin duty on,and admin use /kill
they will spawn with Default skin?
how to make they spawn with admin duty skin ( when admin duty on )?