#define SendFMessage(%1,%2,%3,%4) do{new sendfstring[128];format(sendfstring,128,(%3),%4);SendClientMessage(%1,(%2),sendfstring);}while(FALSE)CMD:b(playerid, params[]){new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new mseg[128];if(sscanf(params,\"s[128]\",mseg)) return SendClientMessage(playerid,0xFF0000FF, \"Használat: /b [szöveg]\"); if(IsPlayerInRangeOfPoint(playerid, 10, x, y, z)){SendFMessage(playerid,0xffffffAA,\"» %s mondja ((OOC: %s))\",UnderscoreToSpaceName(playerid),mseg);}return 1;}stock UnderscoreToSpaceName(playerid){ new Name0[MAX_PLAYER_NAME]; if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, Name0, sizeof(Name0)); } else { Name0 = \"Disconnected/Nothing\"; } for(new name0 = 0; name0 < MAX_PLAYER_NAME; name0++) if(Name0[name0] == \'_\') Name0[name0] = \' \'; return Name0;}
#include <a_samp>#include zcmd#include sscanf2 #define SendFMessage(%1,%2,%3,%4) do{new sendfstring[128];format(sendfstring,128,(%3),%4);SendClientMessage(%1,(%2),sendfstring);}while(FALSE) CMD:b(playerid, params[]) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new mseg[128]; if(sscanf(params,\"s[128]\",mseg)) return SendClientMessage(playerid,0xFF0000FF, \"Használat: /b [szöveg]\"); if(IsPlayerInRangeOfPoint(playerid, 10, x, y, z)) { SendFMessage(playerid,0xffffffAA,\"» %s mondja ((OOC: %s))\",UnderscoreToSpaceName(playerid),mseg); } return 1; } stock UnderscoreToSpaceName(playerid) { new Name0[MAX_PLAYER_NAME]; if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, Name0, sizeof(Name0)); } else { Name0 = \"Disconnected/Nothing\"; } for(new name0 = 0; name0 < MAX_PLAYER_NAME; name0++) if(Name0[name0] == \'_\') Name0[name0] = \' \'; return Name0; }
loose indentation
FALSE
#define FALSE = false;
#include <a_samp>#include <zcmd>#include <sscanf2>#pragma tabsize 0CMD:b(playerid, params[]){new Float:x, Float:y, Float:z, strin[128]; GetPlayerPos(playerid, x, y, z); new mseg[128];if(sscanf(params,\"s[128]\",mseg)) return SendClientMessage(playerid,0xFF0000FF, \"Használat: /b [szöveg]\"); if(IsPlayerInRangeOfPoint(playerid, 10, x, y, z)){format(strin,sizeof(strin),\"» %s mondja ((OOC: %s))\",UnderscoreToSpaceName(playerid),mseg);SendClientMessage(playerid,0xc4ff00AA,strin);}return 1;} stock UnderscoreToSpaceName(playerid) { new Name0[MAX_PLAYER_NAME]; if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, Name0, sizeof(Name0)); } else { Name0 = \"Disconnected/Nothing\"; } for(new name0 = 0; name0 < MAX_PLAYER_NAME; name0++) if(Name0[name0] == \'_\') Name0[name0] = \' \'; return Name0; }
if(strcmp(cmdtext, \"/b\", true) == 0){GetPlayerName(playerid, sendername, sizeof(sendername));new length = strlen(cmdtext);while ((idx < length) && (cmdtext[idx] <= \' \')){idx++;}new offset = idx;new result[128];while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))){result[idx - offset] = cmdtext[idx];idx++;}result[idx - offset] = EOS;if(!strlen(result)){SendClientMessage(playerid, COLOR_WHITE, \"/b [üzenet]\");return 1;}format(string, sizeof(string), \"%s mondja OOC: (( %s ))\", sendername, result);ProxDetector(B_Normal, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);return 1;}
public ProxDetector(Float:radi, playerid, string[],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 = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i)) { if(!BigEar) { new VW = GetPlayerVirtualWorld(playerid); new VW2 = GetPlayerVirtualWorld(i); GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); //printf(\"DEBUG: X:%f Y:%f Z:%f\",posx,posy,posz); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) { if(VW == VW2) { SendClientMessage(i, col1, string); } } else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) { if(VW == VW2) { SendClientMessage(i, col2, string); } } else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) { if(VW == VW2) { SendClientMessage(i, col3, string); } } else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) { if(VW == VW2) { SendClientMessage(i, col4, string); } } else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { if(VW == VW2) { SendClientMessage(i, col5, string); } } } else { SendClientMessage(i, col1, string); } }}}return 1;}
if(strcmp(cmdtext, \"/b\", true) == 0){GetPlayerName(playerid, sendername, sizeof(sendername));new length = strlen(cmdtext);while ((idx < length) && (cmdtext[idx] <= \' \')){idx++;}new offset = idx;new result[128];while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))){result[idx - offset] = cmdtext[idx];idx++;}result[idx - offset] = EOS;if(!strlen(result)){SendClientMessage(playerid, COLOR_WHITE, \"/b [üzenet]\");return 1;}format(string, sizeof(string), \"%s mondja OOC: (( %s ))\", sendername, result);ProxDetector(B_Normal, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);return 1;} ProxDetector: public ProxDetector(Float:radi, playerid, string[],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 = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i)) { if(!BigEar) { new VW = GetPlayerVirtualWorld(playerid); new VW2 = GetPlayerVirtualWorld(i); GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); //printf(\"DEBUG: X:%f Y:%f Z:%f\",posx,posy,posz); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) { if(VW == VW2) { SendClientMessage(i, col1, string); } } else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) { if(VW == VW2) { SendClientMessage(i, col2, string); } } else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) { if(VW == VW2) { SendClientMessage(i, col3, string); } } else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) { if(VW == VW2) { SendClientMessage(i, col4, string); } } else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { if(VW == VW2) { SendClientMessage(i, col5, string); } } } else { SendClientMessage(i, col1, string); } }}}return 1;}