Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ocmd:aduty(playerid,params[]){
- new string[128];
- if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_GRAY,"Du bist ein Admin!!");
- if(PlayerInfo[playerid][pAdminDuty] == 0)
- {
- format(string,sizeof(string),"%s Ist jetzt als Admin Aktiv",GetName(playerid));
- SendClientMessageToAll(COLOR_GREEN,string);
- SetPlayerHealth(playerid,500000);
- SetPlayerColor(playerid,COLOR_CYAN);
- PlayerInfo[playerid][pAdminDuty] = 1;
- adminlabel[playerid] = Create3DTextLabel("Admin on duty\n Nicht Angreifen!", COLOR_RED, 30.0, 40.0, 50.0, 40.0, 0);
- Attach3DTextLabelToPlayer(adminlabel[playerid], playerid, 0.0, 0.0, 0.7);
- }
- else
- if(PlayerInfo[playerid][pAdminDuty] == 1)
- {
- format(string,sizeof(string),"%s Hat sich als admin abegmeldet",GetName(playerid));
- SendClientMessageToAll(COLOR_RED,string);
- PlayerInfo[playerid][pAdminDuty] = 0;
- ResetPlayerWeapons(playerid);
- SetPlayerColor(playerid,COLOR_WHITE);
- SetPlayerHealth(playerid,0);
- ForceClassSelection(playerid);
- Delete3DTextLabel(adminlabel[playerid]);
- }
- return 1;
- }
- und die stock
- stock GetName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, Name, sizeof(Name));
- }
- else
- {
- Name = "Disconnected/Nothing";
- }
- return Name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement