Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <foreach>
- #include <zcmd>
- new mask[MAX_PLAYERS];
- public OnPlayerConnect(playerid)
- {
- mask[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- mask[playerid] = 0;
- return 1;
- }
- stock ProxDetector(Float:radi, playerid, string[],color)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- foreach(Player,i)
- {
- if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
- {
- SendClientMessage(i,color,string);
- }
- }
- }
- public OnPlayerText(playerid, text[])
- {
- new string[128];
- if(mask[playerid] == 1)
- {
- format(string, sizeof(string), "Stranger Says: %s", text);
- ProxDetector(30.0, playerid, string, -1);
- }
- return 0;
- }
- CMD:mask(playerid, params[])
- {
- if(mask[playerid] == 0)
- {
- SendClientMessage(playerid, -1, "Anda Memasang Mask[OOC]");
- mask[playerid] = 1;
- for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
- }
- else
- {
- SendClientMessage(playerid, -1, "Anda Mencabut Mask[OOC]");
- mask[playerid] = 0;
- for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment