COMMAND:me(playerid, params[]){ new SenderName[MAX_PLAYER_NAME],string[128]; GetPlayerName(playerid,SenderName,sizeof(SenderName)); if(isnull(params)) return SendClientMessage(playerid, 0xFFFF00AA,\"HIBA: hasznald /me [cselekves]\"); format(string, sizeof(string), \"*%s %s\", SenderName, params); SendClientMessageToAll( 0xFFFF00AA, string); return 1;}
#include <a_samp>#include <zcmd>#define COLOR_PURPLE 0xC2A2DAAA#define COLOR_AQUA 0x7CFC00AAforward ProxDetector(Float:radi, playerid, strp[], col1, col2, col3, col4, col5);public ProxDetector(Float:radi, playerid, strp[], col1, col2, col3, col4, col5) { if(IsPlayerConnected(playerid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); if(((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) SendClientMessage(i, col1, strp); else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) SendClientMessage(i, col2, strp); else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) SendClientMessage(i, col3, strp); else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) SendClientMessage(i, col4, strp); else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) SendClientMessage(i, col5, strp); } } } return 1;}CMD:me(playerid, params[]) {if(isnull(params)) return SendClientMessage(playerid,COLOR_AQUA,\"Használat:/me [Cselekmény]\");new name[MAX_PLAYER_NAME], str[128];GetPlayerName(playerid, name, sizeof(name));format(str, 128, \"%s %s.\", name, params);ProxDetector(20.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);SetPlayerChatBubble(playerid, params, COLOR_PURPLE, 25.0, 8000);return 1;}
new cselekmeny[128];
.......\"s[128]\",cselekmeny......
CMD:me(playerid, params[]){new Float:x, Float:y, Float:z;GetPlayerPos(playerid, x, y, z);new cselekmeny[128];new name[MAX_PLAYER_NAME], string[100+MAX_PLAYER_NAME];for(new i=0;i<MAX_PLAYERS;i++){if(IsPlayerConnected(i)==1){ if(IsPlayerInRangeOfPoint(i, 20, x, y, z)) { GetPlayerName(playerid, name, sizeof(name)); if(sscanf(params,\"s[128]\",cselekmeny)) return SendClientMessage(playerid,COLOR_AQUA,\"Használat:/me [Cselekmény]\"); format(string, sizeof(string), \"*%s %s.\", name , cselekmeny); SendClientMessage(i,COLOR_YELLOW,string); }}}return 1;}