//----------------------------------[ooc]-----------------------------------------------if(strcmp(cmd, \"/ooc\", true) == 0 || strcmp(cmd, \"/o\", true) == 0){ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" You havent logged in yet !\"); return 1; } if ((noooc) && PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GRAD2, \" The OOC channel has been disabled by an Admin !\"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, \" You can\'t speak, you have been silenced !\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: (/o)oc [ooc chat]\"); return 1; } format(string, sizeof(string), \"(( %s: %s ))\", sendername, result); OOCOff(COLOR_OOC,string); printf(\"%s\", string);}return 1;}
//----------------------------------[Emote]-----------------------------------------------if(strcmp(cmd, \"/me\", true) == 0){ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" You havent logged in yet !\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /me [action]\"); return 1; } format(string, sizeof(string), \"* %s %s\", sendername, result); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf(\"%s\", string);}return 1;}
//----------------------------------[ooc]-----------------------------------------------if(strcmp(cmd, \"/ooc\", true) == 0 || strcmp(cmd, \"/o\", true) == 0){ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" You havent logged in yet !\"); return 1; } if ((noooc) && PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GRAD2, \" The OOC channel has been disabled by an Admin !\"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, \" You can\'t speak, you have been silenced !\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: (/o)oc [ooc chat]\"); return 1; } format(string, sizeof(string), \"(( %s: %s ))\", sendername, result); OOCOff(COLOR_OOC,string); printf(\"%s\", string);}return 1;} //----------------------------------[Emote]-----------------------------------------------if(strcmp(cmd, \"/me\", true) == 0){ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" You havent logged in yet !\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /me [action]\"); return 1; } format(string, sizeof(string), \"* %s %s\", sendername, result); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf(\"%s\", string);}return 1;} Rem jó, a gf bõl vágtam:D
public OnPlayerText( playerid, text[ ] ) { for( new x = 0; x < MAX_PLAYERS; ++x ) { if( !IsPlayerConnected( x ) || IsPlayerNPC( x ) ) continue; static Float: playerPos[ 3 ]; GetPlayerPos( playerid, playerPos[ 0 ], playerPos[ 1 ], playerPos[ 2 ] ); if( !IsPlayerInRangeOfPoint( x, 20.0, playerPos[ 0 ], playerPos[ 1 ], playerPos[ 2 ] ) ) continue; SendPlayerMessageToPlayer( x, playerid, text );}return 0;}