Én ezzel nem igazán értek egyet,na de értékeltem.
Nézem,hogy a script mûködött-e,meg hogy milyen eszközöket használ stb...
Név nélkül kaptam õket,kivéve 1-et,de annak úgy is mindegy,max pont = 5
3 pont.
#include <a_samp>
#include <zcmd>
#include <sscanf>
#define DIALOG_INDOK 981
#undef MAX_PLAYERS
#define MAX_PLAYERS 30
new Rangnev[][] = {\"Újonc\", \"Õrmester\", \"Törzsõrmester\", \"Fõtörzsõrmester\", \"Zászlós\", \"Törzszászlós\", \"Fõtörzszászlós\", \"Hadnagy\", \"Fõhadnagy\", \"Százados\", \"Õrnagy\", \"Alezredes\", \"Ezredes\", \"Dandártábornok\", \"Vezérõrnagy\", \"Altábornagy\", \"Vezérezredes\"};
new Rangnev2[][] = {\"Újonc\", \"Orvos\", \"Fõorvos\", \"Mentõsfõnök\"};
enum pRendor
{
Rendor = 1,
Rendorfonok = 1,
Szolgalat = 1,
MSzolgalat = 1,
Mentos = 1,
Mentosfonok = 1,
Eladofonok = 1,
Elado = 1,
Rang,
MRang
};
forward Kienged(playerid);
public Kienged(playerid)
{
SetPlayerPos(playerid, kiX, kiY, kiZ); // Hova tegye a játékost kiengedés után
SetPlayerInterior(playerid, 0);
return 1;
}
new stringa[128];
new id, Sokkolva[MAX_PLAYERS] = 1, Bilincselve[MAX_PLAYERS] = 1;
new RendorInfo[MAX_PLAYERS][pRendor];
CMD:rendorfonok(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /rendorfonok [név/azonosító]\");
if(RendorInfo[id][Rendorfonok]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már rendõrfõnök!\");
if(RendorInfo[id][Rendor]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már rendõr, rúgd ki!\");
RendorInfo[id][Rendorfonok] = 0;
RendorInfo[id][Rang] = 16;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy RCON admin!\");
}
return 1;
}
CMD:mentosfonok(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /mentosfonok [név/azonosító]\");
if(RendorInfo[id][Mentosfonok]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már mentõsfõnök!\");
if(RendorInfo[id][Mentos]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már mentõs, rúgd ki!\");
RendorInfo[id][Mentosfonok] = 0;
RendorInfo[id][MRang] = 3;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy RCON admin!\");
}
return 1;
}
CMD:eladofonok(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /eladofonok [név/azonosító]\");
if(RendorInfo[id][Eladofonok]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már eladófõnök!\");
if(RendorInfo[id][Elado]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már eladó, rúgd ki!\");
RendorInfo[id][Eladofonok] = 0;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy RCON admin!\");
}
return 1;
}
CMD:rendor(playerid, params[])
{
if(RendorInfo[playerid][Rendorfonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /rendor [név/azonosító]\");
if(RendorInfo[id][Rendor]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már rendõr!\");
RendorInfo[id][Rendor] = 0;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy rendõrfõnök!\");
}
return 1;
}
CMD:mentos(playerid, params[])
{
if(RendorInfo[playerid][Mentosfonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /mentos [név/azonosító]\");
if(RendorInfo[id][Mentos]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már mentõs!\");
RendorInfo[id][Mentos] = 0;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy mentõsfõnök!\");
}
return 1;
}
CMD:elado(playerid, params[])
{
if(RendorInfo[playerid][Eladofonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /elado [név/azonosító]\");
if(RendorInfo[id][Mentos]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már eladó!\");
RendorInfo[id][Elado] = 0;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy eladófõnök!\");
}
return 1;
}
CMD:kirug(playerid, params[])
{
if(RendorInfo[playerid][Rendorfonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /kirug [név/azonosító]\");
if(RendorInfo[id][Rendor]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos nem rendõr!\");
RendorInfo[id][Rendor] = 1;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy rendõrfõnök!\");
}
return 1;
}
CMD:mkirug(playerid, params[])
{
if(RendorInfo[playerid][Mentosfonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /mkirug [név/azonosító]\");
if(RendorInfo[id][Mentos]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos nem mentõs!\");
RendorInfo[id][Mentos] = 1;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy mentõsfõnök!\");
}
return 1;
}
CMD:ekirug(playerid, params[])
{
if(RendorInfo[playerid][Eladofonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /ekirug [név/azonosító]\");
if(RendorInfo[id][Elado]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos nem eladó!\");
RendorInfo[id][Elado] = 1;
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy eladófõnök!\");
}
return 1;
}
CMD:sokk(playerid, params[])
{
if(RendorInfo[playerid][Rendor] || RendorInfo[playerid][Rendorfonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /sokk [név/azonosító]\");
if(IsPlayerInRangeOfPlayer(playerid, id, 1.0))
{
if(!Sokkolva[id])
{
Sokkolva[id] = 0;
TogglePlayerControllable(id, false);
} else {
SendClientMessage(playerid, 0x00FF00AA, \"A játékos már sokkolva van!\");
}
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy elég közel hozzá!\");
}
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy rendõrfõnök / rendõr!\");
}
return 1;
}
CMD:elenged(playerid, params[])
{
if(RendorInfo[playerid][Rendor] || RendorInfo[playerid][Rendorfonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /elenged [név/azonosító]\");
if(IsPlayerInRangeOfPlayer(playerid, id, 1.0))
{
if(Sokkolva[id] || Bilincselve[id] & Sokkolva[id] || !Bilincselve[id])
{
Sokkolva[id] = 1;
Bilincselve[id] = 1;
TogglePlayerControllable(id, true);
} else {
SendClientMessage(playerid, 0x00FF00AA, \"A játékos nincs sokkolva / bilincselve!\");
}
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy elég közel hozzá!\");
}
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy rendõrfõnök / rendõr!\");
}
return 1;
}
CMD:bilincs(playerid, params[])
{
if(RendorInfo[playerid][Rendor] || RendorInfo[playerid][Rendorfonok])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /bilincs [név/azonosító]\");
if(IsPlayerInRangeOfPlayer(playerid, id, 1.0))
{
if(!Sokkolva[id])
{
Bilincselve[id] = 0;
if(Bilincselve[id]) return SendClientMessage(playerid, 0x00FF00AA, \"A játékos már bilincselve van!\");
} else {
SendClientMessage(playerid, 0x00FF00AA, \"A játékos nincs sokkolva!\");
}
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy elég közel hozzá!\");
}
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy rendõrfõnök / rendõr!\");
}
return 1;
}
CMD:lecsuk(playerid, params[])
{
new jailtime;
if(sscanf(params, \"ui\", id, jailtime)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /lecsuk [név/azonosító] [idõ]\");
if(jailtime < 0 || jailtime > 2001) return SendClientMessage(playerid, 0x00FF00AA, \"Az idõ 1 és 2000 között legyen!\");
if(IsPlayerInRangeOfPlayer(playerid, id, 3.0))
{
if(RendorInfo[playerid][Rendor] || RendorInfo[playerid][Rendorfonok])
{
Lecsuk(id, jailtime);
ShowPlayerDialog(playerid, DIALOG_INDOK, DIALOG_STYLE_LIST, \"Lecsukás - Vád\", \"Vádakat ide\\n -el elválasztva\", \"Ez legyen!\", \"Nincs vád\");
}
} else {
SendClientMessage(playerid, 0x00FF00AA, \"Nem vagy elég közel hozzá!\");
}
return 1;
}
CMD:allj(playerid, params[])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /allj [név/azonosító]\");
if(IsPlayerInRangeOfPlayer(playerid, id, 3.0))
{
if(RendorInfo[playerid][Rendor] || RendorInfo[playerid][Rendorfonok])
{
format(stringa, 128, \"Rendõrségi kihangosító: %s álljon meg, vagy 3 figyelmeztetés után lõni fogunk!\", pName(id));
SendClientMessage(id, 0x00FF00AA, stringa);
}
}
return 1;
}
CMD:gyogyit(playerid, params[])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Hasznalat: /gyogyit [név/azonosító]\");
if(IsPlayerInRangeOfPlayer(playerid, id, 3.0))
{
if(RendorInfo[playerid][Mentos] || RendorInfo[playerid][Mentosfonok])
{
new Float:hp;
GetPlayerHealth(id, hp);
if(hp < 31)
{
SetPlayerHealth(id, 100);
}
}
}
return 1;
}
CMD:elad(playerid, params[])
{
if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /elad [név/azonosító]\");
if(IsPlayerInRangeOfPlayer(playerid, id, 3.0) && IsPlayerInRangeOfPoint(playerid, 30.0, -2637.69, 1404.24, 906.46))
{
if(RendorInfo[playerid][Elado] || RendorInfo[playerid][Eladofonok])
{
SetPlayerDrunkLevel(id, 50000);
}
}
return 1;
}
CMD:rendorok(playerid, params[])
{
for(new i; i < MAX_PLAYERS; i++ && RendorInfo[Rendor] || RendorInfo[Rendorfonok] && IsPlayerConnected(i))
{
SendClientMessage(playerid,0x00FF00AA, \"Jelenleg fent lévõ rendõrök:\");
if(IsPlayerAdmin(playerid))
{
format(stringa, 128, \"%s - Rang: %s\", pName(i), Rangnev[RendorInfo[Rang]]);
SendClientMessage(playerid, 0x00AA00AA, stringa);
}
}
return 1;
}
CMD:mentosok(playerid, params[])
{
for(new i; i < MAX_PLAYERS; i++ && RendorInfo[Mentos] || RendorInfo[Mentosfonok] && IsPlayerConnected(i))
{
SendClientMessage(playerid,0x00FF00AA, \"Jelenleg fent lévõ mentõsök:\");
if(IsPlayerAdmin(playerid))
{
format(stringa, 128, \"%s - Rang: %s\", pName(i), Rangnev2[RendorInfo[MRang]]);
SendClientMessage(playerid, 0x00AA00AA, stringa);
}
}
return 1;
}
CMD:eladok(playerid, params[])
{
for(new i; i < MAX_PLAYERS; i++ && RendorInfo[Elado] || RendorInfo[Eladofonok] && IsPlayerConnected(i))
{
SendClientMessage(playerid,0x00FF00AA, \"Jelenleg fent lévõ eladók:\");
if(IsPlayerAdmin(playerid))
{
format(stringa, 128, \"%s\", pName(i));
SendClientMessage(playerid, 0x00AA00AA, stringa);
}
}
return 1;
}
CMD:rang(playerid, params[])
{
new rang, stringe[128];
if(sscanf(params, \"ui\", id, rang)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /rang [név/azonosító] [rang azonosító]\");
if(rang >= 0 || rang <= 16) return SendClientMessage(playerid, 0x00FF00AA, \"A rang 0 és 16 között legyen!\");
if(id != playerid) return SendClientMessage(playerid, 0x00FF00AA, \"Magadnak nem adhatsz rangot!\");
if(RendorInfo[playerid][Rendorfonok])
{
format(stringe, 128, \"Rangot kaptál %s -tól/-tõl! Új rangod: %s\", pName(playerid), Rangnev[rang]);
SendClientMessage(id, 0x00FF00AA, stringe);
RendorInfo[playerid][Rang] = rang;
}
return 1;
}
CMD:mrang(playerid, params[])
{
new rang, stringe[128];
if(sscanf(params, \"ui\", id, rang)) return SendClientMessage(playerid, 0x00FF00AA, \"Használat: /mrang [név/azonosító] [rang azonosító]\");
if(rang >= 0 || rang <= 16) return SendClientMessage(playerid, 0x00FF00AA, \"A rang 0 és 16 között legyen!\");
if(id != playerid) return SendClientMessage(playerid, 0x00FF00AA, \"Magadnak nem adhatsz rangot!\");
if(RendorInfo[playerid][Mentosfonok])
{
format(stringe, 128, \"Rangot kaptál %s -tól/-tõl! Új rangod: %s\", pName(playerid), Rangnev[rang]);
SendClientMessage(id, 0x00FF00AA, stringe);
RendorInfo[playerid][MRang] = rang;
}
return 1;
}
CMD:szolgalat(playerid, params[])
{
new stringe[128];
if(RendorInfo[playerid][Rendorfonok] || RendorInfo[playerid][Rendor])
{
if(!RendorInfo[playerid][szolgalat])
{
RendorInfo[playerid][szolgalat] = 0;
format(stringe, 128, \"%s %s szolgálatba állt.\", pName(playerid), Rangnev[RendorInfo[playerid][Rang]]);
SendClientMessageToAll(0x00FF00AA, stringe);
if(RendorInfo[playerid][Rang] == 0) SetPlayerSkin(playerid, 280), GivePlayerWeapon(playerid, WEAPON_DEAGLE, 500);
if(RendorInfo[playerid][Rang] >= 1 || RendorInfo[playerid][Rang] <= 3) SetPlayerSkin(playerid, 281), GivePlayerWeapon(playerid, WEAPON_DEAGLE, 1000), GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 50);
if(RendorInfo[playerid][Rang] >= 4 || RendorInfo[playerid][Rang] <= 6) SetPlayerSkin(playerid, 267), GivePlayerWeapon(playerid, WEAPON_DEAGLE, 1500), GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 100), GivePlayerWeapon(playerid, WEAPON_M4, 500);
if(RendorInfo[playerid][Rang] >= 7 || RendorInfo[playerid][Rang] <= 9) SetPlayerSkin(playerid, 266), GivePlayerWeapon(playerid, WEAPON_DEAGLE, 2000), GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 150), GivePlayerWeapon(playerid, WEAPON_M4, 1000);
if(RendorInfo[playerid][Rang] >= 10 || RendorInfo[playerid][Rang] <= 12) SetPlayerSkin(playerid, 265), GivePlayerWeapon(playerid, WEAPON_DEAGLE, 2500), GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 200), GivePlayerWeapon(playerid, WEAPON_M4, 1500);
if(RendorInfo[playerid][Rang] >= 13 || RendorInfo[playerid][Rang] <= 15) SetPlayerSkin(playerid, 283), GivePlayerWeapon(playerid, WEAPON_DEAGLE, 3000), GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 250), GivePlayerWeapon(playerid, WEAPON_M4, 2000);
if(RendorInfo[playerid][Rang] == 16) SetPlayerSkin(playerid, 288), GivePlayerWeapon(playerid, WEAPON_DEAGLE, 3500), GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 300), GivePlayerWeapon(playerid, WEAPON_M4, 2500);
} else {
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, 29);
}
}
return 1;
}
CMD:mszolgalat(playerid, params[])
{
new stringe[128];
if(RendorInfo[playerid][Mentosfonok] || RendorInfo[playerid][Mentos])
{
if(!RendorInfo[playerid][MSzolgalat])
{
RendorInfo[playerid][MSzolgalat] = 0;
format(stringe, 128, \"%s %s szolgálatba állt.\", pName(playerid), Rangnev2[RendorInfo[playerid][MRang]]);
SendClientMessageToAll(0x00FF00AA, stringe);
if(RendorInfo[playerid][Rang] == 0) SetPlayerSkin(playerid, 274);
if(RendorInfo[playerid][Rang] >= 1 || RendorInfo[playerid][Rang] <= 2) SetPlayerSkin(playerid, 276);
if(RendorInfo[playerid][Rang] == 3) SetPlayerSkin(playerid, 275);
} else {
SetPlayerSkin(playerid, 29);
}
}
return 1;
}
stock Lecsuk(jailid, time)
{
SetTimerEx(\"Kienged\", time, false, \"i\", jailid);
SetPlayerInterior(jailid, 10);
SetPlayerPos(id,223.3760,109.9426,999.0156);
return 1;
}
stock pName(playerid)
{
new name[24];
GetPlayerName(playerid, name, 24);
return name;
}
stock IsPlayerInRangeOfPlayer(playerid, targetid, Float:distance)
{
new
Float:X, Float:Y, Float:Z, Float:tX, Float:tY, Float:tZ;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerPos(targetid, tX, tY, tZ);
if(IsPlayerInRangeOfPoint(playerid, distance, tX, tY, tZ)) return 1;
return 0;
}
2 pont.
#include <a_samp>
#pragma tabsize 0
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GREEN 0x33AA00FF
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_MUNKAS 0x33CCFFAA
#define COLOR_TUZOLTO 0xFF8000FF
#define COLOR_FUNYIRO 0x00FF00AA
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, \"\")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
new funyiropickup,tuzoltopickup,munkaspickup;
new Munka[MAX_PLAYERS]; // 0 - munkanélküli, 1 - tuzolto, 2 - funyiro, 3 - munkas
new MunkaCP[MAX_PLAYERS],TuzoltoMeghivo[MAX_PLAYERS];
new Float:TuzoltoCP[5][3] ={
{-2211.0251,592.4757,35.1691},
{-2517.9946,-30.2207,25.6172},
{-2219.1165,-105.0330,35.320},
{-1741.5844,764.9371,24.8906},
{-2500.0085,768.4565,35.17195}
};
new Float:FunyiroCP[5][3] ={
{-2405.5952,-40.4680,35.3203},
{-2386.7107,-3.6984,35.3125},
{-2400.8496,53.5246,35.1641},
{-2314.9673,67.7440,35.3125},
{-2386.3313,131.8021,35.3125}
};
new Float:MunkasCP[5][3] ={
{-2119.1274,247.0910,35.5713},
{-2096.2307,282.9105,35.1641},
{-2051.1360,284.9580,34.9053},
{-2051.2654,229.4458,35.4925},
{-2087.9277,134.6419,35.1118}
};
main()
{
print(\"\\n----------------------------------\");
print(\" Munka mod\");
print(\"----------------------------------\\n\");
}
public OnPlayerConnect(playerid)
{
SetPlayerColor(playerid,COLOR_WHITE);
MunkaCP[playerid]=0;
Munka[playerid]=0;
TuzoltoMeghivo[playerid]=0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
MunkaCP[playerid]=0;
Munka[playerid]=0;
TuzoltoMeghivo[playerid]=0;
return 1;
}
public OnGameModeInit()
{
SetGameModeText(\"Munka Mod\");
AddPlayerClass(294,-2671.2295,1594.8923,217.2739,269.7636,0,0,0,0,0,0);
AddStaticVehicle(486,-2089.4326,163.9075,35.2728,91.6990,1,1); // munkas dozer
AddStaticVehicle(486,-2084.3774,171.7414,35.2741,355.4088,1,1); // munkas dozer
AddStaticVehicle(486,-2090.2937,179.3667,35.2752,86.3345,1,1); // munkas dozer
AddStaticVehicle(486,-2106.3186,177.2894,35.3694,256.1705,1,1); // munkas dozer
AddStaticVehicle(407,-2022.1189,92.7316,28.3107,295.8546,3,1); // funyiro
AddStaticVehicle(407,-2021.1365,86.4027,28.2154,307.5674,3,1); // funyiro
AddStaticVehicle(407,-2021.8759,77.3205,28.2665,315.7158,3,1); // funyiro
AddStaticVehicle(407,-2031.8188,59.6566,28.6240,271.2271,3,1); // funyiro
AddStaticVehicle(572,-2382.5588,-61.0578,34.9000,2.2845,101,1); // tuzoltoauto
AddStaticVehicle(572,-2385.3625,-60.3379,34.9002,359.7296,101,1); // tuzoltoauto
AddStaticVehicle(572,-2388.9495,-60.7656,34.9001,0.1603,101,1); // tuzoltoauto
AddStaticVehicle(572,-2391.9656,-60.6833,34.9002,1.7489,101,1); // tuzoltoauto
tuzoltopickup=CreatePickup(1314,23,-2026.8340,67.1426,28.6916);
funyiropickup=CreatePickup(1314,23,-2380.9749,-55.9236,35.3125);
munkaspickup=CreatePickup(1314,23,-2091.6343,168.8263,35.0547);
Create3DTextLabel(\"Tûzoltó munka\",COLOR_RED,-2026.8340,67.1426,28.6916+0.5,40.0,0);
Create3DTextLabel(\"Fûnyíró munka\",COLOR_RED,-2380.9749,-55.9236,35.3125+0.5,40.0,0);
Create3DTextLabel(\"Munkás munka\",COLOR_RED,-2091.6343,168.8263,35.0547+0.5,40.0,0);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid,-1978.5630,275.1326,35.1719);
SetPlayerFacingAngle(playerid,90);
SendClientMessage(playerid,COLOR_YELLOW,\"Ha meg akarod nézni, ki hol dolgozik, írd be /dolgozok !\");
SendClientMessage(playerid,COLOR_YELLOW,\"Ha dolgozni akarsz írd be /munka !\");
return 1;
}
public OnPlayerPickUpPickup(playerid,pickupid)
{
if(pickupid == tuzoltopickup) ShowPlayerDialog(playerid,100,DIALOG_STYLE_LIST,\"Munka\",\"Belépni a tûzoltó munkába\",\"Rendben\",\"Mégse\");
if(pickupid == funyiropickup) ShowPlayerDialog(playerid,101,DIALOG_STYLE_LIST,\"Munka\",\"Belépni a fûnyíró munkába\",\"Rendben\",\"Mégse\");
if(pickupid == munkaspickup) ShowPlayerDialog(playerid,102,DIALOG_STYLE_LIST,\"Munka\",\"Belépni a munkás munkába\",\"Rendben\",\"Mégse\");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(tuzoltomeghivo,14,cmdtext);
if(!strcmp(cmdtext, \"/munka\", true))
{
ShowPlayerDialog(playerid,99,DIALOG_STYLE_LIST,\"Munkák\",\"Tûzoltó\\nFûnyíró\\nMunkás\",\"Rendben\",\"Mégse\");
return 1;
}
if(!strcmp(cmdtext, \"/dolgozok\", true))
{
SendClientMessage(playerid,COLOR_YELLOW,\"][Dolgozók:][\");
for(new i;i<GetMaxPlayers();i++)
{
if(IsPlayerConnected(i) )
{
new string[128];
if(Munka==0) format(string,sizeof(string),\"%s: Munkanélküli\",pName(i));
if(Munka==1) format(string,sizeof(string),\"%s: Tûzoltó\",pName(i));
if(Munka==2) format(string,sizeof(string),\"%s: Fûnyíró\",pName(i));
if(Munka==3) format(string,sizeof(string),\"%s: Munkás\",pName(i));
SendClientMessage(playerid,COLOR_YELLOW,string);
}
}
return 1;
}
if(!strcmp(cmdtext, \"/tuzoltas\", true))
{
if(Munka[playerid]==1)
{
DisablePlayerCheckpoint(playerid);
MunkaCP[playerid]=1;
new rand = random(sizeof(TuzoltoCP));
SetPlayerCheckpoint(playerid,TuzoltoCP[rand][0],TuzoltoCP[rand][1],TuzoltoCP[rand][2],2);
SendClientMessage(playerid,COLOR_GREEN,\"Menj a piros jelbe!\");
}else{
SendClientMessage(playerid,COLOR_RED,\"Nem vagy tûzoltó!\");
}
return 1;
}
if(!strcmp(cmdtext, \"/funyiras\", true))
{
if(Munka[playerid]==2)
{
DisablePlayerCheckpoint(playerid);
MunkaCP[playerid]=1;
new rand = random(sizeof(FunyiroCP));
SetPlayerCheckpoint(playerid,FunyiroCP[rand][0],FunyiroCP[rand][1],FunyiroCP[rand][2],2);
SendClientMessage(playerid,COLOR_GREEN,\"Menj a piros jelbe!\");
}else{
SendClientMessage(playerid,COLOR_RED,\"Nem vagy fûnyíró!\");
}
return 1;
}
if(!strcmp(cmdtext, \"/dozerolas\", true))
{
if(Munka[playerid]==3)
{
DisablePlayerCheckpoint(playerid);
MunkaCP[playerid]=1;
new rand = random(sizeof(MunkasCP));
SetPlayerCheckpoint(playerid,MunkasCP[rand][0],MunkasCP[rand][1],MunkasCP[rand][2],2);
SendClientMessage(playerid,COLOR_GREEN,\"Menj a piros jelbe!\");
}else{
SendClientMessage(playerid,COLOR_RED,\"Nem vagy munkás!\");
}
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(MunkaCP[playerid]==1)
{
MunkaCP[playerid]=0;
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid,5000);
GameTextForPlayer(playerid,\"~b~Fizet¾s!~n~~g~5000$\",5000,6);
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 99)
{
if(response == 1)
{
if(listitem == 1)
{
SetPlayerPos(playerid,-2380.0015,-44.8025,35.3125);
SetPlayerFacingAngle(playerid,176);
}
if(listitem == 0)
{
SetPlayerPos(playerid,-1998.7446,74.3545,28.1777);
SetPlayerFacingAngle(playerid,94.;
}
if(listitem == 2)
{
SetPlayerPos(playerid,-2111.1799,166.6430,35.0711);
SetPlayerFacingAngle(playerid,282.6);
}
}
}
if(dialogid == 100)
{
if(response == 1)
{
if(listitem == 0)
{
if(TuzoltoMeghivo[playerid]==1)
{
Munka[playerid]=1;
SendClientMessage(playerid,COLOR_GREEN,\"Beléptél a tûzoltó munkába. Szállj be a tûzoltóautóba és írd be /tuzoltas hogy pénzt keress!\");
SetPlayerColor(playerid,COLOR_TUZOLTO);
SetPlayerSkin(playerid,279); //tuzolto skin
GivePlayerWeapon(playerid,42,10000); //poroltó
DisablePlayerCheckpoint(playerid);
MunkaCP[playerid]=0;
}else{
SendClientMessage(playerid,COLOR_RED,\"Nincs meghívód a munkába! Kérj egy RCON Admintól! \");
}
}
}
}
if(dialogid == 101)
{
if(response == 1)
{
if(listitem == 0)
{
Munka[playerid]=2;
SendClientMessage(playerid,COLOR_GREEN,\"Beléptél a fûnyíró munkába. Szállj be a fûnyíró traktorba és írd be /funyiras hogy pénzt keress!\");
SetPlayerColor(playerid,COLOR_FUNYIRO);
SetPlayerSkin(playerid,16); //funyiro skin
GivePlayerWeapon(playerid,4,10000); //kés, hogy vágja a füvet xD
DisablePlayerCheckpoint(playerid);
MunkaCP[playerid]=0;
}
}
}
if(dialogid == 102)
{
if(response == 1)
{
if(listitem == 0)
{
Munka[playerid]=3;
SendClientMessage(playerid,COLOR_GREEN,\"Beléptél a munkás munkába. Szállj be a Dozer-be és írd be /dozerolas hogy pénzt keress!\");
SetPlayerColor(playerid,COLOR_MUNKAS);
SetPlayerSkin(playerid,27); //munkás skin
GivePlayerWeapon(playerid,6,10000); //ásó
DisablePlayerCheckpoint(playerid);
MunkaCP[playerid]=0;
}
}
}
return 1;
}
stock pName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
dcmd_tuzoltomeghivo(playerid,params[])
{
if(IsPlayerAdmin(playerid) )
{
new tmp[256], Index; tmp = strtok(params,Index);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, \"Használat: /tuzoltomeghivo [playerid]\");
return 1;
}
new i = strval(tmp), string[128];
if(!IsPlayerConnected(i))
{
SendClientMessage(playerid, COLOR_RED,\"Nincs ilyen játékos!\");
return 1;
}
if( TuzoltoMeghivo == 0)
{
TuzoltoMeghivo = 1;
format(string,sizeof(string),\"Admin %s meghívót adott %s-nak a tûzoltó munkához!\",pName(playerid),pName(i));
SendClientMessageToAll(COLOR_GREEN,string);
}else{
SendClientMessage(playerid,COLOR_RED,\"A játékosnak már van meghívója!\");
}
}else{
SendClientMessage(playerid,COLOR_RED,\"Nem vagy RCON Admin!\");
}
return 1;
}
strtok(const ta[], &index)
{
new length = strlen(ta);
while ((index < length) && (ta[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (ta[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = ta[index];
index++;
}
result[index - offset] = EOS;
return result;
}
0 pont és legszívesebben kizárnálak az egész versenybõl,sõt,bannolnálak a fórumról,nem azt kértem,hogy írd rá a neved egy másik scriptre....
#include <a_samp>
#pragma tabsize 0
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0x00FF7F
#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_YELLOW 0xFFFF00AA
#define MAX_GANGS 5
#define MAX_GANG_NAME 15
#define MAX_GANG_MEMBERS 10
new gangNames[MAX_GANGS][MAX_GANG_NAME];
new gangInfo[MAX_GANGS][3];
new playerGang[MAX_PLAYERS];
new gangMembers[MAX_GANGS][MAX_GANG_MEMBERS];
new gangInvite[MAX_PLAYERS];
new playerColors[100] = {
0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,0xFFD720FF,
0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,
0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,
0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,
0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF,
0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,
0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,
0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,
0x9F945CFF,0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,
0x3FE65CFF
};
forward PlayerLeaveGang(playerid);
public OnFilterScriptInit()
{
print(\"\\n======================================\");
print(\" --------------By.David94---------------\");
print(\"\\n======================================\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public PlayerLeaveGang(playerid) {
new string[256];
new playername[MAX_PLAYER_NAME];
new gangnum = playerGang[playerid];
if(gangnum > 0) {
for(new i = 0; i < gangInfo[gangnum][1]; i++) {
if(gangMembers[gangnum]==playerid) {
gangInfo[gangnum][1]--;
for(new j = i; j < gangInfo[gangnum][1]; j++)
{
gangMembers[gangnum][j]=gangMembers[gangnum][j+1];
}
if(gangInfo[gangnum][1]<1) {
gangInfo[gangnum][0]=0;
gangInfo[gangnum][1]=0;
}
for(new j = 0; j < gangInfo[gangnum][1]; j++) {
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string),\"%s kilépet a bandábol.\", playername);
SendClientMessage(gangMembers[gangnum][j], COLOR_ORANGE, string);
}
format(string, sizeof(string),\"kilépet a bandábol \'%s\' (id: %d)\", gangNames[gangnum], gangnum);
SendClientMessage(playerid, COLOR_ORANGE, string);
playerGang[playerid]=0;
return;
}
}
} else {
SendClientMessage(playerid, COLOR_RED, \"Nem vagy tagja egy bandának se.\");
}
}
public OnPlayerCommandText(playerid,cmdtext[])
{
new string[256];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid,idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, \"/gang\", true) == 0) {
new gangcmd, gangnum;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /gang [create/join/invite/quit]\");
return 1;
}
giveplayerid = strval(tmp);
if(strcmp(tmp, \"create\", true)==0)
gangcmd = 1;
else if(strcmp(tmp, \"join\", true)==0)
gangcmd = 2;
else if(strcmp(tmp, \"invite\", true)==0)
gangcmd = 3;
else if(strcmp(tmp, \"quit\", true)==0)
gangcmd = 4;
tmp = strtok(cmdtext, idx);
if(gangcmd < 4 && !strlen(tmp)) {
if(gangcmd==0)
SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /gang [create/join/quit] [name/number]\");
else if(gangcmd==1)
SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /gang [create] [banda Neve]\");
else if(gangcmd==2)
SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /gang [join] [banda id-je]\");
else if(gangcmd==3)
SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /gang [Meghívás] [játékos ID]\");
return 1;
}
//---------------------------------------Banda létrehozása-------------------------------------------
if(gangcmd==1) {
if(playerGang[playerid]>0) {
SendClientMessage(playerid, COLOR_RED, \"Neked már van bandád!\");
return 1;
}
for(new i = 1; i < MAX_GANGS; i++) {
if(gangInfo[0]==0) {
format(gangNames, MAX_GANG_NAME, \"%s\", tmp);
gangInfo[0]=1;
gangInfo[1]=1;
gangInfo[2]=playerColors[playerid];
gangMembers[0] = playerid;
format(string, sizeof(string),\"Létrehoztál egy bandát \'%s\' (id: %d)\", gangNames, i);
SendClientMessage(playerid, COLOR_GREEN, string);
playerGang[playerid]=i;
return 1;
}
}
return 1;
//------------------------------------------csatlakozás egy bandához-----------------------------------//
} else if (gangcmd==2) {
gangnum = strval(tmp);
if(gangInfo[gangnum][0]==0) {
SendClientMessage(playerid, COLOR_RED, \"Ez a banda nem létezik!\");
return 1;
}
if(gangInvite[playerid]!=gangnum) {
SendClientMessage(playerid, COLOR_RED, \"A csatlakozáshoz meghívó szükséges.\");
return 1;
}
if(gangInfo[gangnum][1] < MAX_GANG_MEMBERS) {
new i = gangInfo[gangnum][1];
gangMembers[gangnum] = playerid;
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
for(new j = 0; j < gangInfo[gangnum][1]; j++) {
format(string, sizeof(string),\"%s Csatlakozott a bandádba.\", sendername);
SendClientMessage(gangMembers[gangnum][j], COLOR_ORANGE, string);
}
gangInfo[gangnum][1]++;
playerGang[playerid] = gangnum;
SetPlayerColor(playerid,gangInfo[gangnum][2]);
format(string, sizeof(string),\"Sikeressen csatlakoztál a bandába \'%s\' (id: %d)\", gangNames[gangnum], gangnum);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED, \"A banda létszáma tele van, nem csatlakozhatsz.\");
return 1;
//-------------------------------------Meghívás a bandába------------------------------------------//
} else if (gangcmd==3) {
giveplayerid = strval(tmp);
if(playerGang[playerid]==0) {
SendClientMessage(playerid, COLOR_RED, \"A banda nem létezik!\");
return 1;
}
if(IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string),\"Kaptál egy banda meghívót %s-töl \'%s\'bandába (id: %d)\", sendername, gangNames[playerGang[playerid]],playerGang[playerid]);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
gangInvite[giveplayerid]=playerGang[playerid];
} else
SendClientMessage(playerid, COLOR_YELLOW, \"A játékos nem létezik!\");
//------------------------------------Kilépés egy bandábol------------------------------------------//
} else if (gangcmd==4) {
PlayerLeaveGang(playerid);
}
return 1;
}
//---------------------------------------------------bandainfo-------------------------------------------
if(strcmp(cmd, \"/ganginfo\", true) == 0) {
new gangnum;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && playerGang[playerid]==0) {
SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /ganginfo [number]\");
return 1;
} else if (!strlen(tmp))
gangnum = playerGang[playerid];
else
gangnum = strval(tmp);
if(gangInfo[gangnum][0]==0) {
SendClientMessage(playerid, COLOR_YELLOW, \"A banda nem létezik vagy rossz ID-t írtál!\");
return 1;
}
format(string, sizeof(string),\"\'%s\' Banda Alapítója (id: %d)\", gangNames[gangnum], gangnum);
SendClientMessage(playerid, COLOR_GREEN, string);
for(new i = 0; i < gangInfo[gangnum][1]; i++) {
GetPlayerName(gangMembers[gangnum], giveplayer, sizeof(giveplayer));
format(string, sizeof(string),\"%s (%d)\", giveplayer, gangMembers[gangnum]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
//---------------------------------------------Bandák-------------------------------------
if(strcmp(cmd, \"/gangs\", true) == 0)
{
new x;
SendClientMessage(playerid, COLOR_GREEN, \"Bandák:\");
for(new i=0; i < MAX_GANGS; i++) {
if(gangInfo[0]==1) {
format(string, sizeof(string), \"%s%s(%d) - létszám %d\", string,gangNames,i,gangInfo[1]);
x++;
if(x > 2) {
SendClientMessage(playerid, COLOR_YELLOW, string);
x = 0;
format(string, sizeof(string), \"\");
} else {
format(string, sizeof(string), \"%s, \", string);
}
}
}
if(x <= 2 && x > 0) {
string[strlen(string)-2] = \'.\';
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
return 0;
}
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;
}