#include <a_samp>#include <core>#include <float>#pragma tabsize 0#define GROVE_STREET 1#define POLICE 2#define GROVE_STREET_COLOUR 0x00820FAA#define POLICE_COLOUR 0x003DF5AAnew gTeam[MAX_PLAYERS];main(){print(\"\\n----------------------------------\");print(\" Bare Script\\n\");print(\"----------------------------------\\n\");}public OnPlayerConnect(playerid){GameTextForPlayer(playerid,\"~w~SA-MP: ~r~Bare Script\",5000,5);return 1;}public OnPlayerCommandText(playerid, cmdtext[]){new idx;new cmd[256];cmd = strtok(cmdtext, idx);if(strcmp(cmd, \"/yadayada\", true) == 0) { return 1;}return 0;}public OnPlayerSpawn(playerid){SetPlayerToTeamColour(playerid){ if(gTeam[playerid] == GROVE_STREET) { SetPlayerColor(playerid,GROVE_STREET_COLOUR); //Green } if(gTeam[playerid] == POLICE) { SetPlayerColor(playerid,POLICE_COLOUR); // Blue }}public OnPlayerDeath(playerid, killerid, reason){ return 1;}SetupPlayerForClassSelection(playerid){SetPlayerInterior(playerid,14);SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);SetPlayerFacingAngle(playerid, 270.0);SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);}public OnPlayerRequestClass(playerid, classid){SetPlayerTeamFromClass(playerid, classid){ if(classid == 0) { gTeam[playerid] = GROVE_STREET; } if(classid == 1) { gTeam[playerid] = POLICE; }public OnGameModeInit(){SetGameModeText(\"[HUN] Police Mod\");ShowPlayerMarkers(1);ShowNameTags(1);AllowAdminTeleport(1);AddPlayerClass(105,2497.2693,-1676.9578,13.3398,23.6501,0,0,0,0,0,0); //Grove Street Gang Member (0)AddPlayerClass(280,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Police Officer (1)AddStaticVehicle(596,1535.9954,-1678.1025,13.1029,0.2147,1,0); //AddStaticVehicle(596,1535.9640,-1669.5818,13.0989,0.2146,1,0); //return 1;}strtok(const string[], &index){new length = strlen(string);while ((index < length) && (string[index] <= \' \')){index++;}new offset = index;new result[20];while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1))){result[index - offset] = string[index];index++;}result[index - offset] = EOS;return result;}[/quote]Vége:IdézetD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(30) : error 017: undefined symbol \"strtok\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(30) : error 033: array must be indexed (variable \"cmd\")D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(27) : warning 203: symbol is never used: \"idx\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(41) : error 017: undefined symbol \"SetPlayerToTeamColour\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(52) : error 029: invalid expression, assumed zeroD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(52) : error 004: function \"OnPlayerDeath\" is not implementedD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(54) : error 079: inconsistent return types (array & non-array)D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(57) : warning 225: unreachable codeD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(57) : error 017: undefined symbol \"SetupPlayerForClassSelection\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(66) : error 029: invalid expression, assumed zeroD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(66) : error 004: function \"OnPlayerRequestClass\" is not implementedD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(68) : error 017: undefined symbol \"SetPlayerTeamFromClass\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(70) : error 017: undefined symbol \"classid\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(74) : error 017: undefined symbol \"classid\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(78) : error 029: invalid expression, assumed zeroD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(78) : error 004: function \"OnGameModeInit\" is not implementedD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(89) : error 079: inconsistent return types (array & non-array)D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : warning 225: unreachable codeD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 017: undefined symbol \"strtok\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 029: invalid expression, assumed zeroD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 017: undefined symbol \"string\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 19 Errors.
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(30) : error 017: undefined symbol \"strtok\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(30) : error 033: array must be indexed (variable \"cmd\")D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(27) : warning 203: symbol is never used: \"idx\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(41) : error 017: undefined symbol \"SetPlayerToTeamColour\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(52) : error 029: invalid expression, assumed zeroD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(52) : error 004: function \"OnPlayerDeath\" is not implementedD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(54) : error 079: inconsistent return types (array & non-array)D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(57) : warning 225: unreachable codeD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(57) : error 017: undefined symbol \"SetupPlayerForClassSelection\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(66) : error 029: invalid expression, assumed zeroD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(66) : error 004: function \"OnPlayerRequestClass\" is not implementedD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(68) : error 017: undefined symbol \"SetPlayerTeamFromClass\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(70) : error 017: undefined symbol \"classid\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(74) : error 017: undefined symbol \"classid\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(78) : error 029: invalid expression, assumed zeroD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(78) : error 004: function \"OnGameModeInit\" is not implementedD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(89) : error 079: inconsistent return types (array & non-array)D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : warning 225: unreachable codeD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 017: undefined symbol \"strtok\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 029: invalid expression, assumed zeroD:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 017: undefined symbol \"string\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 19 Errors.
public OnPlayerSpawn(playerid){ if(gTeam[playerid] == GROVE_STREET) return SetPlayerColor(playerid,GROVE_STREET_COLOUR); //Green if(gTeam[playerid] == POLICE) return SetPlayerColor(playerid,POLICE_COLOUR); // Blue return 1;}public OnPlayerDeath(playerid, killerid, reason){ return 1;}SetupPlayerForClassSelection(playerid){ SetPlayerInterior(playerid,14); SetPlayerPos(playerid,258.4893,-41.4008,1002.0234); SetPlayerFacingAngle(playerid, 270.0); SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234); SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);}public OnPlayerRequestClass(playerid, classid){ SetPlayerTeamFromClass(playerid, classid); if(classid == 0) return gTeam[playerid] = GROVE_STREET; if(classid == 1) return gTeam[playerid] = POLICE; return 1;}
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(61) : error 017: undefined symbol \"SetPlayerTeamFromClass\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(99) : warning 203: symbol is never used: \"SetupPlayerForClassSelection\"Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase [/quote]
Beraktam és ez jött D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(61) : error 017: undefined symbol \"SetPlayerTeamFromClass\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(99) : warning 203: symbol is never used: \"SetupPlayerForClassSelection\"Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase [/quote]open Gf.. ctrl+c, ctrl+v..
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(61) : error 017: undefined symbol \"SetPlayerTeamFromClass\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(99) : warning 203: symbol is never used: \"SetupPlayerForClassSelection\"Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Beraktam és ez jött D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(61) : error 017: undefined symbol \"SetPlayerTeamFromClass\"D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(99) : warning 203: symbol is never used: \"SetupPlayerForClassSelection\"Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase [/quote]A Te kódodba nem volt a SetPlayerTeamFromClass függvény ezért ír rá hibát.A SetPlayerTeamFromClass függvényt pedig nem tudja elérni a pawno.Próbáld így ( ez hibátlan ): public OnPlayerSpawn(playerid){ if(gTeam[playerid] == GROVE_STREET) return SetPlayerColor(playerid,GROVE_STREET_COLOUR); //Green if(gTeam[playerid] == POLICE) return SetPlayerColor(playerid,POLICE_COLOUR); // Blue return 1;}public OnPlayerDeath(playerid, killerid, reason){ return 1;}SetupPlayerForClassSelection(playerid){ SetPlayerInterior(playerid,14); SetPlayerPos(playerid,258.4893,-41.4008,1002.0234); SetPlayerFacingAngle(playerid, 270.0); SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234); SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);}public OnPlayerRequestClass(playerid, classid){ SetupPlayerForClassSelection(playerid, classid); if(classid == 0) return gTeam[playerid] = GROVE_STREET; if(classid == 1) return gTeam[playerid] = POLICE; return 1;}
public OnPlayerSpawn(playerid){ if(gTeam[playerid] == GROVE_STREET) return SetPlayerColor(playerid,GROVE_STREET_COLOUR); //Green if(gTeam[playerid] == POLICE) return SetPlayerColor(playerid,POLICE_COLOUR); // Blue return 1;}public OnPlayerDeath(playerid, killerid, reason){ return 1;}SetupPlayerForClassSelection(playerid){ SetPlayerInterior(playerid,14); SetPlayerPos(playerid,258.4893,-41.4008,1002.0234); SetPlayerFacingAngle(playerid, 270.0); SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234); SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);}public OnPlayerRequestClass(playerid, classid){ SetupPlayerForClassSelection(playerid, classid); if(classid == 0) return gTeam[playerid] = GROVE_STREET; if(classid == 1) return gTeam[playerid] = POLICE; return 1;}