if(strcmp(cmd, \"/me\", true) == 0){new myName[MAX_PLAYER_NAME];new message[256]; if(IsPlayerConnected(playerid)) { 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_GRAD1, \"Használat: /me [Akció]\"); return 1; } format(string, sizeof(string), \"* %s %s\", myName, message); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf(\"%s\", string);}return 1;}
GetPlayerName( playerid, myName, sizeof myName );
GetPlayerName( playerid, myName, sizeof(myName));
GetPlayerName( playerid, myName, sizeof(myName)); ezt nem így?és ne message-t írj a formathoz hanem (result)ot
if(strcmp(cmd, \"/me\", true) == 0){ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" Nem vagy bejelentkezve !\"); 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; } if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), \"* Ismeretlen %s\", result); } else { 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;}
if(strcmp(cmd, \"/me\", true) == 0){new myName[MAX_PLAYER_NAME]; GetPlayerName(playerid, myName, sizeof(myName));new message[256]; if(IsPlayerConnected(playerid)) { 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_GRAD1, \"Használat: /me [Akció]\"); return 1; } format(string, sizeof(string), \"* %s %s\", myName, message); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf(\"%s\", string);}return 1;}
if(strcmp(cmd, \"/me\", true) == 0){if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[63]; if(length > 63) { while ((idx < 63) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } format(string, sizeof(string), \"* %s %s\", sendername, result); result[idx - offset] = EOS; } else { while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; format(string, sizeof(string), \"* %s %s\", sendername, result); } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"Használat: /me [action]\"); return 1; } ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf(\"%s\", string);}return 1;}