if( strcmp( parancs, \"/asay\", true ) == 0 ){ new Text[128]; new AText[128];format( Text, sizeof(Text), \"* Admin %s: %s\", PlayerName, AText);SendClientMessageToAll( PIROS , Text );return 1;}
C:\\Documents and Settings\\XP4ever\\Asztal\\SZERVER\\gamemodes\\mod.pwn(669) : error 076: syntax error in the expression, or invalid function call
CMD:asay(playerid, params[]){if(PInfo[playerid][Level] >= 1){new text[128];if(sscanf(params, \"s[128]\",text)) return SendClientMessage(playerid, 0xFFFFFFFF, \"Használat: /asay [szöveg]\");new kakak[128];format(kakak,sizeof kakak,\"<< Admin [Level: %d] %s mondja: %s >>\", PInfo[playerid][Level], GetPName(playerid), text);SendClientMessageToAll(0xA10000AA,kakak);}SendClientMessage(playerid,COLOR_RED,\"Nem vagy Admin!\");return 1;}
CMD:asay(playerid, params[]){ new name[MAX_PLAYER_NAME], szoveg[128]; if(sscanf(params, \"s[128]\", szoveg)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /asay <szöveg>\"); GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(szoveg, sizeof(szoveg), \"Admin | %s(%d) : %s\", name, playerid, szoveg); SendClientMessageToAll(0xFF0000AA, szoveg); return 1;}
Szerintem jobb, ha sscanf-ot használsz, és zcmd-t, mert ezeknél jobb nincs. CMD:asay(playerid, params[]){ new name[MAX_PLAYER_NAME], szoveg[128]; if(sscanf(params, \"s[128]\", szoveg)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /asay <szöveg>\"); GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(szoveg, sizeof(szoveg), \"Admin | %s(%d) : %s\", name, playerid, szoveg); SendClientMessageToAll(0xFF0000AA, szoveg); return 1;}
CMD:asay(playerid, params[]){ new name[MAX_PLAYER_NAME], szoveg[128], string[128]; if(sscanf(params, \"s[128]\", szoveg)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /asay <szöveg>\"); GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(string, sizeof(string), \"Admin | %s(%d) : %s\", name, playerid, szoveg); SendClientMessageToAll(0xFF0000AA, string); return 1;}
if( strcmp( parancs, \"/asay\", true ) == 0 ){ new Text[128]; new AText[128] = strrest(cmdtext, idx); if(!strlen(AText)) return SendClientMessage(playerid, -1, \"Használd: /asay [üzenet]\"); new n[24]; GetPlayerName(playerid, n, 24);format( Text, sizeof(Text), \"* Admin %s: %s\", n, AText);SendClientMessageToAll( PIROS , Text );return 1;}
stock strrest(const string[], &index){new length = strlen(string);while ((index < length) && (string[index] <= \' \')){index++;}new offset = index;new result[128];while ((index < length) && ((index - offset) < (sizeof(result) - 1))){result[index - offset] = string[index];index++;}result[index - offset] = EOS;return result;}