#include <a_samp>static gTeam[MAX_PLAYERS];#define TEAM_CIVIL 0#define TEAM_BUNOZO 1#define TEAM_SZERELO 2#define TEAM_RENDOR 3public OnGameModeInit(){AddPlayerClass(71,0.0,0.0,0,0.0,0,0,0,0,0,0);AddPlayerClass(200,-0.0,0.0,0,0.0,0,0,0,0,0,0);AddPlayerClass(0,1632.4402,-2143.9746,13.5547,256.5949,0,0,0,0,0,0);AddPlayerClass(281,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);}public OnPlayerSpawn(playerid) if(gTeam[playerid] == TEAM_CIVIL) {SetPlayerColor(playerid,0x33AA33AA); // Blue GivePlayerWeapon(playerid, 25, 10000);// fegyvert ad}else if(gTeam[playerid] == TEAM_BUNOZO) { SetPlayerColor(playerid,0x33AA33AA); // Blue GivePlayerWeapon(playerid, 25, 10000);// fegyvert ad} if(gTeam[playerid] == TEAM_SZERELO) { GivePlayerWeapon(plyerid, 31, 100000; } if(gTeam[playerid] == TEAM_RENDOR) { GivePlayerWeapon(playerid, 30, 100000 SetPlayerClass(playerid, classid) {if(classid == 0) {gTeam[playerid] = TEAM_CIVIL;} else if(classid == 1) {gTeam[playerid] = TEAM_BUNOZO;} if(classid == 2) {gTeam[playerid] = TEAM_SZERELO;} if(classid == 3) {gTeam[playerid] = TEAM_RENDOR;public OnPlayerRequestClass(playerid, classid){SetPlayerClass(playerid, classid);SetupPlayerForClassSelection(playerid);gPlayerClass[playerid] = classid;switch (classid) { case 0: { GameTextForPlayer(playerid, \"~b~Civil\", 500, 3); }case 1: { GameTextForPlayer(playerid, \"~g~Bunozo!\", 500, 3); } case 2: { GameTextForPlayer(playerid, \"~g~SZERELO\", 500, 3); } case 3: { GameTextForPlayer(playerid, \"~g~RENDOR\", 500, 3); } { return 1;} Error:C:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(27) : error 010: invalid function or declarationC:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(31) : error 010: invalid function or declarationC:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(51) : warning 217: loose indentationC:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(51) : error 029: invalid expression, assumed zeroC:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(51) : error 004: function \"OnPlayerRequestClass\" is not implementedC:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(53) : error 001: expected token: \";\", but found \"{\"C:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(57) : error 017: undefined symbol \"SetupPlayerForClassSelection\"C:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(59) : error 017: undefined symbol \"gPlayerClass\"C:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(59) : warning 215: expression has no effectC:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(59) : error 001: expected token: \";\", but found \"]\"C:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(59) : error 029: invalid expression, assumed zeroC:\\Documents and Settings\\Dyross Dark\\Asztal\\gteam.pwn(59) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 10 Errors.
#include <a_samp>static gTeam[MAX_PLAYERS],gPlayerClass[MAX_PLAYERS];#define TEAM_CIVIL 0#define TEAM_BUNOZO 1#define TEAM_SZERELO 2#define TEAM_RENDOR 3public OnGameModeInit(){AddPlayerClass(71,0.0,0.0,0,0.0,0,0,0,0,0,0);AddPlayerClass(200,-0.0,0.0,0,0.0,0,0,0,0,0,0);AddPlayerClass(0,1632.4402,-2143.9746,13.5547,256.5949,0,0,0,0,0,0);AddPlayerClass(281,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);}public OnPlayerSpawn(playerid) {if(gTeam[playerid] == TEAM_CIVIL) {SetPlayerColor(playerid,0x33AA33AA); // BlueGivePlayerWeapon(playerid, 25, 10000);// fegyvert ad}else if(gTeam[playerid] == TEAM_BUNOZO) {SetPlayerColor(playerid,0x33AA33AA); // BlueGivePlayerWeapon(playerid, 25, 10000);// fegyvert ad}else if(gTeam[playerid] == TEAM_SZERELO) {GivePlayerWeapon(playerid, 31, 100000);}else if(gTeam[playerid] == TEAM_RENDOR) {GivePlayerWeapon(playerid, 30, 100000);}}stock SetPlayerClass(playerid, classid) {if(classid == 0) {gTeam[playerid] = TEAM_CIVIL;} else if(classid == 1) {gTeam[playerid] = TEAM_BUNOZO;} if(classid == 2) {gTeam[playerid] = TEAM_SZERELO;} if(classid == 3) {gTeam[playerid] = TEAM_RENDOR;}}public OnPlayerRequestClass(playerid, classid){SetPlayerClass(playerid, classid);SetupPlayerForClassSelection(playerid);gPlayerClass[playerid] = classid;switch (classid) {case 0:{ GameTextForPlayer(playerid, \"~b~Civil\", 500, 3);}case 1:{ GameTextForPlayer(playerid, \"~g~Bunozo!\", 500, 3);}case 2:{ GameTextForPlayer(playerid, \"~g~SZERELO\", 500, 3);}case 3:{ GameTextForPlayer(playerid, \"~g~RENDOR\", 500, 3);}}return 1;}
SetupPlayerForClassSelection függvényt gondolom be tudod rakni.
stock SetupPlayerForclassSelection(playerid) { //ide teszed a SetPlayerCameraPos, SetPlayerCameraLookAt, SetPlayerPos, SetPlayerInterior függvényeket, magyarul ahol a karakterválasztót akarod látni. return 1;}