public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){SetVehicleNumberPlate(playerid, \"REND_SZÁM\");return 1;}
enum data {prefix,prefix_data[32];};new prefix[MAX_PLAYERS][data]; // mód elejérdcmd_myprefix(playerid, params[]){prefix[playerid][prefix] = 1;prefix[playerid][prefix_data] = params;return 1;}dcmd_myprefixoff(playerid, params[]) // kikapcsolja a prefixet{prefix[playerid][prefix] = 0;return 1;}onplayertext alá:if(prefix[playerid] == 1){new string[128];new name[32];new name2[32];GetPlayerName(playerid, name, 32);GetPlayerName(playerid, name2, 32);format(string, 128, \"<%s>%s\", prefix[playerid][prefix_data], name);SetPlayerName(playerid, string);format(string, 128, \"%s:%s\",string,text);SendClientMessageToAll(-1, string);SetPlayerName(playerid, name2);}
Rendszám: public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){SetVehicleNumberPlate(playerid, \"REND_SZÁM\");return 1;} myprefix: enum data {prefix,prefix_data[32];};new prefix[MAX_PLAYERS][data]; // mód elejérdcmd_myprefix(playerid, params[]){prefix[playerid][prefix] = 1;prefix[playerid][prefix_data] = params;return 1;}dcmd_myprefixoff(playerid, params[]) // kikapcsolja a prefixet{prefix[playerid][prefix] = 0;return 1;}onplayertext alá:if(prefix[playerid] == 1){new string[128];new name[32];new name2[32];GetPlayerName(playerid, name, 32);GetPlayerName(playerid, name2, 32);format(string, 128, \"<%s>%s\", prefix[playerid][prefix_data], name);SetPlayerName(playerid, string);format(string, 128, \"%s:%s\",string,text);SendClientMessageToAll(-1, string);SetPlayerName(playerid, name2);}
enum data {prefix,prefix_data[32];};new prefix[MAX_PLAYERS][data]; // mód elejérCMD:myprefix(playerid, params[]){prefix[playerid][prefix] = 1;prefix[playerid][prefix_data] = params;return 1;}CMD:myprefixoff(playerid, params[]) // kikapcsolja a prefixet{prefix[playerid][prefix] = 0;return 1;}onplayertext alá:if(prefix[playerid] == 1){new string[128];new name[32];new name2[32];GetPlayerName(playerid, name, 32);GetPlayerName(playerid, name2, 32);format(string, 128, \"<%s>%s\", prefix[playerid][prefix_data], name);SetPlayerName(playerid, string);format(string, 128, \"%s:%s\",string,text);SendClientMessageToAll(-1, string);SetPlayerName(playerid, name2);}
de igen.. amúgy ezt: \"dcmd_\" kell erre átírni: \"CMD:\", de tessék: enum data {prefix,prefix_data[32];};new prefix[MAX_PLAYERS][data]; // mód elejérCMD:myprefix(playerid, params[]){prefix[playerid][prefix] = 1;prefix[playerid][prefix_data] = params;return 1;}CMD:myprefixoff(playerid, params[]) // kikapcsolja a prefixet{prefix[playerid][prefix] = 0;return 1;}onplayertext alá:if(prefix[playerid] == 1){new string[128];new name[32];new name2[32];GetPlayerName(playerid, name, 32);GetPlayerName(playerid, name2, 32);format(string, 128, \"<%s>%s\", prefix[playerid][prefix_data], name);SetPlayerName(playerid, string);format(string, 128, \"%s:%s\",string,text);SendClientMessageToAll(-1, string);SetPlayerName(playerid, name2);}
C:\\Documents and Settings\\Ricsipc\\Asztal\\samp03x_svr_R1-2_win32\\gamemodes\\HuN.S.pwn(138) : error 017: undefined symbol \"data\"C:\\Documents and Settings\\Ricsipc\\Asztal\\samp03x_svr_R1-2_win32\\gamemodes\\HuN.S.pwn(138) : error 009: invalid array size (negative, zero or out of bounds)C:\\Documents and Settings\\Ricsipc\\Asztal\\samp03x_svr_R1-2_win32\\gamemodes\\HuN.S.pwn(698) : error 033: array must be indexed (variable \"prefix\")C:\\Documents and Settings\\Ricsipc\\Asztal\\samp03x_svr_R1-2_win32\\gamemodes\\HuN.S.pwn(699) : error 017: undefined symbol \"prefix_data\"C:\\Documents and Settings\\Ricsipc\\Asztal\\samp03x_svr_R1-2_win32\\gamemodes\\HuN.S.pwn(699) : error 006: must be assigned to an arrayC:\\Documents and Settings\\Ricsipc\\Asztal\\samp03x_svr_R1-2_win32\\gamemodes\\HuN.S.pwn(705) : error 033: array must be indexed (variable \"prefix\")C:\\Documents and Settings\\Ricsipc\\Asztal\\samp03x_svr_R1-2_win32\\gamemodes\\HuN.S.pwn(1074) : error 033: array must be indexed (variable \"prefix\")C:\\Documents and Settings\\Ricsipc\\Asztal\\samp03x_svr_R1-2_win32\\gamemodes\\HuN.S.pwn(1081) : error 017: undefined symbol \"prefix_data\"Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 8 Errors.
#include a_samp#include zcmd#include sscanf2 enum data {prefix,prefix_data[32]};new pref[MAX_PLAYERS][data]; // mód elejérCOMMAND:myprefix(playerid, params[]){pref[playerid][prefix] = 1;format(pref[playerid][prefix_data], 32, params);return 1;}COMMAND:myprefixoff(playerid, params[]) // kikapcsolja a prefixet{#pragma unused paramspref[playerid][prefix] = 0;return 1;}public OnPlayerText(playerid, text[]){if(pref[playerid][prefix] == 1){new string[128];new name[32];new name2[32];GetPlayerName(playerid, name, 32);GetPlayerName(playerid, name2, 32);format(string, 128, \"<%s>%s\", pref[playerid][prefix_data], name);SetPlayerName(playerid, string);format(string, 128, \"%s:%s\",string,text);SendClientMessageToAll(-1, string);SetPlayerName(playerid, name2);}return 0; // ignore the default text and send the custom one}
kijavítottam: #include a_samp#include zcmd#include sscanf2 enum data {prefix,prefix_data[32]};new pref[MAX_PLAYERS][data]; // mód elejérCOMMAND:myprefix(playerid, params[]){pref[playerid][prefix] = 1;format(pref[playerid][prefix_data], 32, params);return 1;}COMMAND:myprefixoff(playerid, params[]) // kikapcsolja a prefixet{#pragma unused paramspref[playerid][prefix] = 0;return 1;}public OnPlayerText(playerid, text[]){if(pref[playerid][prefix] == 1){new string[128];new name[32];new name2[32];GetPlayerName(playerid, name, 32);GetPlayerName(playerid, name2, 32);format(string, 128, \"<%s>%s\", pref[playerid][prefix_data], name);SetPlayerName(playerid, string);format(string, 128, \"%s:%s\",string,text);SendClientMessageToAll(-1, string);SetPlayerName(playerid, name2);}return 0; // ignore the default text and send the custom one}