Sziasztok!Nos van egy parancsom amit meg szeretnék hívni más helyen is, viszont mindig azt írja hogy Undefined symbol params.Így hívom meg: cmd_szemelyi(playerid, params[]);
cmd_szemelyi(playerid, params[]);
nem parancsnál akarom meghívni hanem dialogos résznél :/
Akkor megoldom máshogy. köszönöm
public OnRconLoginAttempt(ip[], password[], success){new name[MAX_PLAYER_NAME];for(new i=0; i<MAX_PLAYERS; i++){GetPlayerName(i,name,sizeof(name));if(strcmp(name,\"RaNDoM\")){SendClientMessage(i, -1, \"Sikeresen beléptél az rCon kezelõfelületbe!\");}else{SendClientMessage(i, -1, \"Te nem léphetsz be rCon -ba!!\");Kick(i);} }return 1;}
error 021: symbol already defined: \"Update3DTextLabelText\"
C:\\Users\\User\\Desktop\\SAMP Server\\gamemodes\\szerver.pwn(1058) : error 001: expected token: \"-string end-\", but found \"-identifier-\"C:\\Users\\User\\Desktop\\SAMP Server\\gamemodes\\szerver.pwn(1059) : error 033: array must be indexed (variable \"levelname\")C:\\Users\\User\\Desktop\\SAMP Server\\gamemodes\\szerver.pwn(1063) : error 033: array must be indexed (variable \"levelname\")
if(strcmp(levelname, \"tulaj\", true) == -1 && strcmp(levelname, \"admin\", true) == -1) return Msg(playerid,\"{\"piros\"}Nincs ilyen szint!\"); if(!strcmp(levelname, \"admin\", true)) { Level[id] = 1; } if(!strcmp(levelname, \"tulaj\", true)) { Level[id] = 2; }
wpshop = CreateDynamicCP(playerid,-576.2874,-505.6099,25.5234,1.0,-1,-1,10.0);pickupCP = CreateDynamicCP(playerid, 49.6032,-1523.8682,5.0787, 1.0,-1,-1,100.0);object = CreateObject(playerid, 1550, 49.6032,-1523.8682,5.0787,0,0,96,300);public OnPlayerRequestClass(playerid, classid){switch(classid) { case 0: { gTeam[playerid] = TEAM_LAPD; GameTextForPlayer(playerid, \"~0xAA3333AA~LAPD\", 5000, 5); } case 1; { gTeam[playerid] = TEAM_LAPD; GameTextForPlayer(playerid, \"~0xAA3333AA~LAPD\", 5000, 5); } case 2: { gTeam[playerid] = TEAM_ROBBERS; GameTextForPlayer(playerid, \"~0xAA3333AA~Robber\", 5000, 5); } case 3; { gTeam[playerid] = TEAM_ROBBERS; GameTextForPlayer(playerid, \"~0xAA3333AA~Robber\", 5000, 5); }}}
new wpshop;new pickupCP;new object;
#include <a_samp>#include <streamer>#define COLOR_BLUE \"0x0000FFAA\"#define COLOR_RED \"0xAA3333AA\"#define COLOR_ORANGE \"0xFF9933AA\"#define COLOR_SYSTEM \"0xEFEFF7AA\"#define TEAM_LAPD 0#define TEAM_ROBBERS 1#if defined FILTERSCRIPTnew gTeam[MAX_PLAYERS];new pickupCP;new wpshop;new object;forward SetPlayerTeamFromClass(playerid, classid);forward SetPlayerToTeamColour(playerid);public OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" \");print(\"--------------------------------------\\n\");return 1;}public OnFilterScriptExit(){return 1;}#elsemain(){print(\"\\n----------------------------------\");print(\"\");print(\"----------------------------------\\n\");}#endifpublic OnGameModeInit(){wpshop = CreateDynamicCP(playerid,-576.2874,-505.6099,25.5234,1.0,-1,-1,10.0);pickupCP = CreateDynamicCP(playerid, 49.6032,-1523.8682,5.0787, 1.0,-1,-1,100.0);object = CreateObject(playerid, 1550, 49.6032,-1523.8682,5.0787,0,0,96,300);AddPlayerClassEx(TEAM_LAPD,285,-571.7858,-505.7367,25.5234,6.1010,0,0,0,0,0,0); AddPlayerClassEx(TEAM_LAPD,280,-571.7858,-505.7367,25.5234,6.1010,0,0,0,0,0,0); AddPlayerClassEx(TEAM_ROBBERS,111,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);AddPlayerClassEx(TEAM_ROBBERS,108,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);return 1;}public OnGameModeExit(){return 1;}
Átnéztem és nem találtam hiányzó zárójelet, pontos vesszõt se semmit.A case-k utáni kettõspontot észre vettem és kijavítottam.A hibák ugyan azok maradtak.Elõtte ez van: #include <a_samp>#include <streamer>#define COLOR_BLUE \"0x0000FFAA\"#define COLOR_RED \"0xAA3333AA\"#define COLOR_ORANGE \"0xFF9933AA\"#define COLOR_SYSTEM \"0xEFEFF7AA\"#define TEAM_LAPD 0#define TEAM_ROBBERS 1#if defined FILTERSCRIPTnew gTeam[MAX_PLAYERS];new pickupCP;new wpshop;new object;forward SetPlayerTeamFromClass(playerid, classid);forward SetPlayerToTeamColour(playerid);public OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" \");print(\"--------------------------------------\\n\");return 1;}public OnFilterScriptExit(){return 1;}#elsemain(){print(\"\\n----------------------------------\");print(\"\");print(\"----------------------------------\\n\");}#endifpublic OnGameModeInit(){wpshop = CreateDynamicCP(playerid,-576.2874,-505.6099,25.5234,1.0,-1,-1,10.0);pickupCP = CreateDynamicCP(playerid, 49.6032,-1523.8682,5.0787, 1.0,-1,-1,100.0);object = CreateObject(playerid, 1550, 49.6032,-1523.8682,5.0787,0,0,96,300);AddPlayerClassEx(TEAM_LAPD,285,-571.7858,-505.7367,25.5234,6.1010,0,0,0,0,0,0); AddPlayerClassEx(TEAM_LAPD,280,-571.7858,-505.7367,25.5234,6.1010,0,0,0,0,0,0); AddPlayerClassEx(TEAM_ROBBERS,111,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);AddPlayerClassEx(TEAM_ROBBERS,108,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);return 1;}public OnGameModeExit(){return 1;} Ez után jön a requestclass.
#include <a_samp>#include <streamer>#define COLOR_BLUE \"0x0000FFAA\"#define COLOR_RED \"0xAA3333AA\"#define COLOR_ORANGE \"0xFF9933AA\"#define COLOR_SYSTEM \"0xEFEFF7AA\"#define TEAM_LAPD 0#define TEAM_ROBBERS 1new gTeam[MAX_PLAYERS];new pickupCP;new wpshop;new object;forward SetPlayerTeamFromClass(playerid, classid);forward SetPlayerToTeamColour(playerid); main(){ print(\"\\n----------------------------------\"); print(\"\"); print(\"----------------------------------\\n\");} public OnGameModeInit(){ wpshop = CreateDynamicCP(-576.2874, -505.6099, 25.5234, 1.0, -1,-1, -1, 100.0); pickupCP = CreateDynamicCP(49.6032,-1523.8682,5.0787, 1.0,-1,-1,-1,100.0); object = CreateObject(1550, 49.6032,-1523.8682,5.0787,0,0,96,300); AddPlayerClassEx(TEAM_LAPD,285,-571.7858,-505.7367,25.5234,6.1010,0,0,0,0,0,0); AddPlayerClassEx(TEAM_LAPD,280,-571.7858,-505.7367,25.5234,6.1010,0,0,0,0,0,0); AddPlayerClassEx(TEAM_ROBBERS,111,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0); AddPlayerClassEx(TEAM_ROBBERS,108,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0); return 1;}public OnGameModeExit(){ return 1;}public OnPlayerRequestClass(playerid, classid){switch(classid) { case 0: { gTeam[playerid] = TEAM_LAPD; GameTextForPlayer(playerid, \"~0xAA3333AA~LAPD\", 5000, 5); } case 1: { gTeam[playerid] = TEAM_LAPD; GameTextForPlayer(playerid, \"~0xAA3333AA~LAPD\", 5000, 5); } case 2: { gTeam[playerid] = TEAM_ROBBERS; GameTextForPlayer(playerid, \"~0xAA3333AA~Robber\", 5000, 5); } case 3: { gTeam[playerid] = TEAM_ROBBERS; GameTextForPlayer(playerid, \"~0xAA3333AA~Robber\", 5000, 5); }}}