#include <a_samp>#include <zcmd>#include <sscanf2>new gTeam[MAX_PLAYERS];#define TCOP //RendõrCOMMAND:setteam(playerid, params[]){new pid, tid, message[40];if(sscanf(params, \"ii\", pid, tid)) return SendClientMessage(playerid, 0xFFFFFFFF, \"[HIBA]: Használat: /setteam <játékos id> <csapat id/név>\");gTeam[pid] = tid;format(message, sizeof(message), \"Az admin átrakott a %d csapatba\", tid);SendClientMessage(pid, 0x00FF00FF, message);return 1;}
CMD:setteam(playerid, params[]){new pid, tid, message[40];if(sscanf(params, \"ii\", pid, tid)) return SendClientMessage(playerid, 0xFFFFFFFF, \"[HIBA]: Használat: /setteam <játékos id> <csapat id/név>\");gTeam[pid] = tid;format(message, sizeof(message), \"Az admin átrakott a %d csapatba\", tid);SendClientMessage(pid, 0x00FF00FF, message);return 1;}
Még mindig sz@r[/quote]1. Ezt lehet szebben is ki lehetett volna fejezni(rossz).2. A hibákat beillesztenéd?
unknown commands ot ír
#define FILTERSCRIPT#include <zcmd>
#include <a_samp>#include <sscanf2>#define FILTERSCRIPT#include <zcmd>new gTeam[MAX_PLAYERS];#define TCIV 0 //Civil#define TCOP 01 //Rendõr#define TEMR 02 //Mentõ#define TARM 03 //Katona#define TTAX 04 //TaxiCMD:setteam(playerid, params[]){new pid, tid, message[40];if(sscanf(params, \"ii\", pid, tid)) return SendClientMessage(playerid, 0xFFFFFFFF, \"[HIBA]: Használat: /setteam <játékos id> <csapat id/név>\");gTeam[pid] = tid;format(message, sizeof(message), \"Az admin átrakott a %d csapatba\", tid);SendClientMessage(pid, 0x00FF00FF, message);return 1;}
/*********************************** ** @Author: ZeeX ** @Version: 0.3.1 ** @Released: 31/10/2009 ** ***********************************/#if defined _zcmd_included#endinput#endif #define _zcmd_included#define MAX_FUNC_NAME (32)#define COMMAND:%1(%2) \\ forward cmd_%1(%2); \\ public cmd_%1(%2) #define CMD:%1(%2) \\ COMMAND:%1(%2)#define command(%1,%2,%3) \\ COMMAND:%1(%2, %3) #define cmd(%1,%2,%3) \\ COMMAND:%1(%2, %3)#if !defined isnull#define isnull(%1) \\ ((!(%1[0])) || (((%1[0]) == \'\\1\') && (!(%1[1]))))#endif forward OnPlayerCommandReceived(playerid, cmdtext[]); forward OnPlayerCommandPerformed(playerid, cmdtext[], success); staticbool:zcmd_g_HasOPCS = false,bool:zcmd_g_HasOPCE = false;#if defined FILTERSCRIPTpublic OnFilterScriptInit(){zcmd_g_HasOPCS = funcidx(\"OnPlayerCommandReceived\") != -1;zcmd_g_HasOPCE = funcidx(\"OnPlayerCommandPerformed\") != -1; return CallLocalFunction(\"zcmd_OnFilterScriptInit\", \"\");}#if defined _ALS_OnFilterScriptInit #undef OnFilterScriptInit#else #define _ALS_OnFilterScriptInit#endif#define OnFilterScriptInit zcmd_OnFilterScriptInitforward zcmd_OnFilterScriptInit();#else /*not a filterscript*/public OnGameModeInit(){zcmd_g_HasOPCS = funcidx(\"OnPlayerCommandReceived\") != -1;zcmd_g_HasOPCE = funcidx(\"OnPlayerCommandPerformed\") != -1;if (funcidx(\"zcmd_OnGameModeInit\") != -1){return CallLocalFunction(\"zcmd_OnGameModeInit\", \"\");} return 1;}#if defined _ALS_OnGameModeInit #undef OnGameModeInit#else #define _ALS_OnGameModeInit#endif#define OnGameModeInit zcmd_OnGameModeInitforward zcmd_OnGameModeInit();#endif /*if defined FILTERSCRIPT*/public OnPlayerCommandText(playerid, cmdtext[]){ if (zcmd_g_HasOPCS && !CallLocalFunction(\"OnPlayerCommandReceived\", \"is\", playerid, cmdtext)) { return 1; } new pos, funcname[MAX_FUNC_NAME]; while (cmdtext[++pos] > \' \') {funcname[pos-1] = tolower(cmdtext[pos]); }format(funcname, sizeof(funcname), \"cmd_%s\", funcname); while (cmdtext[pos] == \' \') pos++;if (!cmdtext[pos]){if (zcmd_g_HasOPCE){ return CallLocalFunction(\"OnPlayerCommandPerformed\", \"isi\", playerid, cmdtext, CallLocalFunction(funcname, \"is\", playerid, \"\\1\"));}return CallLocalFunction(funcname, \"is\", playerid, \"\\1\"); }if (zcmd_g_HasOPCE){return CallLocalFunction(\"OnPlayerCommandPerformed\", \"isi\", playerid, cmdtext, CallLocalFunction(funcname, \"is\", playerid, cmdtext[pos]));}return CallLocalFunction(funcname, \"is\", playerid, cmdtext[pos]);}#if defined _ALS_OnPlayerCommandText #undef OnPlayerCommandText#else #define _ALS_OnPlayerCommandText#endif#define OnPlayerCommandText zcmd_OnPlayerCommandTextforward zcmd_OnPlayerCommandText(playerid, cmdtext[]);
CMD:setteam(playerid, params[]){if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, \"SERVER: Unknown command.\"); new pid; new tid; new message[40]; if(sscanf(params, \"ii\", pid, tid)) return SendClientMessage(playerid, 0xFFFFFFFF, \"[HIBA]: Használat: /setteam <id> <teamid>\"); if(tid < 0 || tid > 2) return SendClientMessage(playerid, 0xFFFFFFFF, \"Csapatid: 0tól 2-ig!\"); if(IsPlayerConnected(pid) && pid != INVALID_PLAYER_ID) { gTeam[pid]=tid; format(message, sizeof(message), \"Az admin átrakott a %d csapatba\", tid); SendClientMessage(pid, 0x00FF00FF, message); SpawnPlayer(pid);} else return SendClientMessage(playerid,0xf21313AA,\"Játékos nincs csatlakozva\");}
#include <a_samp>#include <sscanf2>#define FILTERSCRIPT#include <zcmd>new gTeam[MAX_PLAYERS];#define TCIV 0 //Civil#define TCOP 1 //Rendõr#define TEMR 2 //Mentõ#define TARM 3 //Katona#define TTAX 4 //TaxiCMD:setteam(playerid, params[]){new pid, tid, message[40];if(sscanf(params, \"ii\", pid, tid)) return SendClientMessage(playerid, 0xFFFFFFFF, \"[HIBA]: Használat: /setteam <játékos id> <csapat id/név>\");gTeam[pid] = tid;format(message, sizeof(message), \"Az admin átrakott a %d csapatba\", tid);SendClientMessage(pid, 0x00FF00FF, message);return 1;}