Jump to content

Forumul a fost actualizat. Informații probleme moderatori aici

Sign in to follow this  
MrJuicee

[Problema Pawn] IF

Recommended Posts

Posted (edited)

Nickname pe forum: MrJuicee

Problema/nelămurirea întămpinată: Orice player poate folosi comenzi dedicate adminilor.

De când  a apărut această problemă: Am adaugat o simpla comanda de /clearchat

Dovezi, poze, video: 

CMD:gotored(playerid, params[]) { if(pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, -1, "You're not an admin!"); { if(pInfo[playerid][Aduty] < 1) return SendClientMessage(playerid, -1, "You're not ON-Duty as an admin!"); { SetPlayerPos(playerid, -690.3032,935.5281,13.6328); SendClientMessage(playerid, -1, "You have been teleported to Red team base"); return 1; } } }

Alte precizări: 
Comanda de [/clearchat]. La fel. Ea functioneaza, dar poate fi folosita de orice player. 


CMD:clearchat(playerid, params[]) { if (pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, -1, "ERROR: You are not authorized to use this command!"); { if (pInfo[playerid][Aduty] < 1) return SendClientMessage(playerid, -1, "ERROR: You're not ON-Duty as an admin!"); } new string[100]; for(new i = 0; i < 100; i ++) SendClientMessageToAll(-1, " "); SendClientMessageToAll(-1, string); return 1; }

Comanda: /aduty care seteaza Aduty la 1: 

CMD:aduty(playerid, params[]) { if(pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, -1, "You're not an admin!"); { pInfo[playerid][Aduty] = 1; SetPlayerSkin(playerid, 217); SetPlayerHealth(playerid, 999999); ResetPlayerWeapons(playerid); SendClientMessage(playerid, COLOR_GREEN, "You're now ON-DUTY as an Admin! Use /adutyoff to become an ordinary player"); new string[256], NameAdmin[MAX_PLAYER_NAME]; GetPlayerName(playerid, NameAdmin, sizeof(string)); format(string, sizeof(string), "Admin %s is now on duty! Use /report for questions or to report a cheater!", NameAdmin, string); SendClientMessageToAll(0x00EEFFFF, string); return 1; } }

Rezolvat. Multumesc

Edited by MrJuicee

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.