#define ENABLE_SPEC#if defined ENABLE_SPECdcmd_lspec(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) { if(!strlen(params) || !IsNumeric(params)) return SendClientMessage(playerid, red, \"Használat: /lspec [playerid]\");new specplayerid = strval(params);if(PlayerInfo[specplayerid][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,\"HIBA: Ezt a parancsot te nem használhatod magasabb szintû admin ellen\"); if(IsPlayerConnected(specplayerid) && specplayerid != INVALID_PLAYER_ID) { if(specplayerid == playerid) return SendClientMessage(playerid, red, \"HIBA: Saját magad nem spectálhatod\"); if(GetPlayerState(specplayerid) == PLAYER_STATE_SPECTATING && PlayerInfo[specplayerid][specID] != INVALID_PLAYER_ID) return SendClientMessage(playerid, red, \"Spectálás: Az a játékos már spectál valakit\"); if(GetPlayerState(specplayerid) != 1 && GetPlayerState(specplayerid) != 2 && GetPlayerState(specplayerid) != 3) return SendClientMessage(playerid, red, \"Spectálás: Játékos nincs lespawnolva\"); if( (PlayerInfo[specplayerid][Level] != ServerInfo[MaxAdminLevel]) || (PlayerInfo[specplayerid][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] == ServerInfo[MaxAdminLevel]) ) { StartSpectate(playerid, specplayerid); CMDMessageToAdmins(playerid,\"LSPEC\"); GetPlayerPos(playerid,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]); GetPlayerFacingAngle(playerid,Pos[playerid][3]); return SendClientMessage(playerid,blue,\"Te most spectálsz\"); } else return SendClientMessage(playerid,red,\"HIBA: Ezt a parancsot te nem használhatod magasabb szintû admin ellen\");} else return SendClientMessage(playerid,red,\"HIBA: Ilyen játékos nem létezik\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 2-as szintû adminnak kéne lenned!\");}dcmd_lspecvehicle(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) { if(!strlen(params)) return SendClientMessage(playerid, red, \"Használat: /lspecvehicle [jármûid]\");new specvehicleid = strval(params);if(specvehicleid < MAX_VEHICLES) { TogglePlayerSpectating(playerid, 1); PlayerSpectateVehicle(playerid, specvehicleid); PlayerInfo[playerid][specID] = specvehicleid; PlayerInfo[playerid][specType] = ADMIN_SPEC_TYPE_VEHICLE; CMDMessageToAdmins(playerid,\"SPEC VEHICLE\"); GetPlayerPos(playerid,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]); GetPlayerFacingAngle(playerid,Pos[playerid][3]); return SendClientMessage(playerid,blue,\"Te most spectálsz\");} else return SendClientMessage(playerid,red, \"HIBA: rosz jármû id\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 2-es szintû adminnak kéne lenned!\");}dcmd_lspecoff(playerid,params[]) {#pragma unused params if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) { if(PlayerInfo[playerid][specType] != ADMIN_SPEC_TYPE_NONE) { StopSpectate(playerid); SetTimerEx(\"PosAfterSpec\",3000,0,\"d\",playerid); return SendClientMessage(playerid,blue,\"Spectálás kikapcsolva\");} else return SendClientMessage(playerid,red,\"HIBA: Te nem spectálsz\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 2-es szintû adminnak kéne lenned!\");}#endif
#define ENABLE_SPEC#if defined ENABLE_SPECdcmd_lspec(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) { if(!strlen(params) || !IsNumeric(params)) return SendClientMessage(playerid, red, \"Használat: /lspec [playerid]\");new specplayerid = strval(params);if(PlayerInfo[specplayerid][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,\"HIBA: Ezt a parancsot te nem használhatod magasabb szintû admin ellen\"); if(IsPlayerConnected(specplayerid) && specplayerid != INVALID_PLAYER_ID) { if(specplayerid == playerid) return SendClientMessage(playerid, red, \"HIBA: Saját magad nem spectálhatod\"); if(GetPlayerState(specplayerid) == PLAYER_STATE_SPECTATING && PlayerInfo[specplayerid][specID] != INVALID_PLAYER_ID) return SendClientMessage(playerid, red, \"Spectálás: Az a játékos már spectál valakit\"); if(GetPlayerState(specplayerid) != 1 && GetPlayerState(specplayerid) != 2 && GetPlayerState(specplayerid) != 3) return SendClientMessage(playerid, red, \"Spectálás: Játékos nincs lespawnolva\"); if( (PlayerInfo[specplayerid][Level] != ServerInfo[MaxAdminLevel]) || (PlayerInfo[specplayerid][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] == ServerInfo[MaxAdminLevel]) ) { StartSpectate(playerid, specplayerid); CMDMessageToAdmins(playerid,\"LSPEC\"); GetPlayerPos(playerid,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]); GetPlayerFacingAngle(playerid,Pos[playerid][3]); return SendClientMessage(playerid,blue,\"Te most spectálsz\"); } else return SendClientMessage(playerid,red,\"HIBA: Ezt a parancsot te nem használhatod magasabb szintû admin ellen\");} else return SendClientMessage(playerid,red,\"HIBA: Ilyen játékos nem létezik\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 2-as szintû adminnak kéne lenned!\");}dcmd_lspecvehicle(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) { if(!strlen(params)) return SendClientMessage(playerid, red, \"Használat: /lspecvehicle [jármûid]\");new specvehicleid = strval(params);if(specvehicleid < MAX_VEHICLES) { TogglePlayerSpectating(playerid, 1); PlayerSpectateVehicle(playerid, specvehicleid); PlayerInfo[playerid][specID] = specvehicleid; PlayerInfo[playerid][specType] = ADMIN_SPEC_TYPE_VEHICLE; CMDMessageToAdmins(playerid,\"SPEC VEHICLE\"); GetPlayerPos(playerid,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]); GetPlayerFacingAngle(playerid,Pos[playerid][3]); return SendClientMessage(playerid,blue,\"Te most spectálsz\");} else return SendClientMessage(playerid,red, \"HIBA: rosz jármû id\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 2-es szintû adminnak kéne lenned!\");}dcmd_lspecoff(playerid,params[]) {#pragma unused params if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) { if(PlayerInfo[playerid][specType] != ADMIN_SPEC_TYPE_NONE) { StopSpectate(playerid); SetTimerEx(\"PosAfterSpec\",3000,0,\"d\",playerid); return SendClientMessage(playerid,blue,\"Spectálás kikapcsolva\");} else return SendClientMessage(playerid,red,\"HIBA: Te nem spectálsz\");} else return SendClientMessage(playerid,red,\"HIBA: Ehez a parancshoz legalább 2-es szintû adminnak kéne lenned!\");}#endif ez ladmin-ba is van.ChuckNorris: Code tagek használata kötelezõ!
kérlek titeket ne Ladminosat ha lehetséges[/quote]Amúgy ami alapból is benne van a szerver csomagban jónak kell lennie!
if(strcmp(cmd, \"/tv\", true) == 0) { if(IsPlayerAdmin(playerid)){ tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /tv [playerid]\"); return 1; } giveplayerid = strval(tmp); if(!IsPlayerConnected(giveplayerid)) { SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen játékos!\"); return 1; } if(giveplayerid == playerid) { SendClientMessage(playerid,COLOR_WHITE,\"Magadad nem tv-zheted!\"); return 1; } TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, giveplayerid); SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid)); gSpectateID[playerid] = giveplayerid; gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"AdmWarning: %s admin elkezdte tv-zni %s -t.\", sendername,giveplayer); AdminLog(string); AdminCucc(COLOR_WHITE,string); } return 1; } if(strcmp(cmd, \"/tvoff\", true) == 0) { if(IsPlayerAdmin(playerid)){ TogglePlayerSpectating(playerid, 0); gSpectateID[playerid] = INVALID_PLAYER_ID; gSpectateType[playerid] = ADMIN_SPEC_TYPE_NONE; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"AdmWarning: %s kikapcsolta a tv-t.\", sendername); AdminLog(string); AdminCucc(COLOR_WHITE,string); } return 1; }
C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16224) : error 017: undefined symbol \"gSpectateID\"C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16224) : warning 215: expression has no effectC:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16224) : error 001: expected token: \";\", but found \"]\"C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16224) : error 029: invalid expression, assumed zeroC:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16224) : fatal error 107: too many error messages on one line
new gSpectateID[MAX_PLAYERS];new gSpectateType[MAX_PLAYERS];
C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16281) : error 017: undefined symbol \"ADMIN_SPEC_TYPE_PLAYER\"C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16285) : error 017: undefined symbol \"AdminLog\"C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16286) : error 017: undefined symbol \"AdminCucc\"C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16295) : error 017: undefined symbol \"ADMIN_SPEC_TYPE_NONE\"C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16298) : error 017: undefined symbol \"AdminLog\"C:\\Documents and Settings\\Rendszergazda\\Asztal\\Hillside.pwn(16299) : error 017: undefined symbol \"AdminCucc\"
if(strcmp(cmd, \"/tv\", true) == 0) { if(IsPlayerAdmin(playerid)){ tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /tv [playerid]\"); return 1; } giveplayerid = strval(tmp); if(!IsPlayerConnected(giveplayerid)) { SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen játékos!\"); return 1; } if(giveplayerid == playerid) { SendClientMessage(playerid,COLOR_WHITE,\"Magadad nem tv-zheted!\"); return 1; } TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, giveplayerid); SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid)); gSpectateID[playerid] = giveplayerid; gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"AdmWarning: %s admin elkezdte tv-zni %s -t.\", sendername,giveplayer); } return 1; } if(strcmp(cmd, \"/tvoff\", true) == 0) { if(IsPlayerAdmin(playerid)){ TogglePlayerSpectating(playerid, 0); gSpectateID[playerid] = INVALID_PLAYER_ID; gSpectateType[playerid] = ADMIN_SPEC_TYPE_NONE; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"AdmWarning: %s kikapcsolta a tv-t.\", sendername); } return 1; }
#define ADMIN_SPEC_TYPE_NONE 0#define ADMIN_SPEC_TYPE_PLAYER 1#define ADMIN_SPEC_TYPE_VEHICLE 2
if (PlayerInfo[playerid][pAdmin] >= 1)//nekem igy néz ki 1-es adminnal a /kick stb...
if(strcmp(cmd, \"/tv\", true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 1){ tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /tv [playerid]\"); return 1; } giveplayerid = strval(tmp); if(!IsPlayerConnected(giveplayerid)) { SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen játékos!\"); return 1; } if(giveplayerid == playerid) { SendClientMessage(playerid,COLOR_WHITE,\"Magadad nem tv-zheted!\"); return 1; } TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, giveplayerid); SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid)); gSpectateID[playerid] = giveplayerid; gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"AdmWarning: %s admin elkezdte tv-zni %s -t.\", sendername,giveplayer); } return 1; } if(strcmp(cmd, \"/tvoff\", true) == 0) { if(IsPlayerAdmin(playerid)){ TogglePlayerSpectating(playerid, 0); gSpectateID[playerid] = INVALID_PLAYER_ID; gSpectateType[playerid] = ADMIN_SPEC_TYPE_NONE; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"AdmWarning: %s kikapcsolta a tv-t.\", sendername); } return 1; }