new string[500];new jatekosnev[MAX_PLAYER_NAME];GetPlayerName(playerid, jatekosnev, MAX_PLAYER_NAME);format(string, sizeof(string), \"%s mondja: %s\", jatekosnev, text);SendPlayerMessageToAll(playerid, string);return 1;
new string[144];new jatekosnev[MAX_PLAYER_NAME];GetPlayerName(playerid, jatekosnev, MAX_PLAYER_NAME);format(string, sizeof(string), \"%s mondja: %s\", jatekosnev, text);SendPlayerMessageToAll(0xFFFFFF, string);return 1;
new string[144];new jatekosnev[MAX_PLAYER_NAME];GetPlayerName(playerid, jatekosnev, MAX_PLAYER_NAME);format(string, sizeof(string), \"%s mondja: %s\", jatekosnev, text);SendClientMessageToAll(-1, string);return 0;
SendClientMessageToAll(-1, string);return 0;Így?
SendClientMessageToAll(-1, string);return 0;
new string[500]; new jatekosnev[MAX_PLAYER_NAME]; GetPlayerName(playerid, jatekosnev, sizeof(jatekosnev)); format(string, sizeof(string), \"%s mondja: %s\", jatekosnev, text); SendPlayerMessageToAll(0xFFFFFFAA string);return 0;}
SendClientMessageToAll(-1, string);return 0;Így? -1, FFFFFF-et ad vissza. szóval ugyan az mint az enyém, a hibát nem a kódba kell keresni... [/quote]Tudom, viszont a return 1 -et átírtam return 0 -ra, mivel ha nem 0 -val tér vissza, 2x küldi el az üzenetet.
CMD:b(playerid, params[]){ new aname[MAX_PLAYER_NAME], string[512]; GetPlayerName(playerid, aname, sizeof(aname)); if(sscanf(params, \"s\", params[0])) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /b [szöveg]\"); format(string, sizeof(string), \"> %s admin szólt: %s <\", aname, params[0]); return SendClientMessageToAll(0xB3D5B2AA,string);}
Nekem ez van és mûködik: CMD:b(playerid, params[]){ new aname[MAX_PLAYER_NAME], string[512]; GetPlayerName(playerid, aname, sizeof(aname)); if(sscanf(params, \"s\", params[0])) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /b [szöveg]\"); format(string, sizeof(string), \"> %s admin szólt: %s <\", aname, params[0]); return SendClientMessageToAll(0xB3D5B2AA,string);}
public OnPlayerText(playerid, text[]) { new string[128], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), \"%s mondja: %s\", pName, text); SendClientMessageToAll(0xFFFFFFFF, string); return 0;}