enum m { rendor, mento, tuzolto,};new munka[MAX_PLAYERS][munka];
CMD:rendor(playerid,params[]){ if(munka[playerid][rendor] == 1) return 0; munka[playerid][rendor] = 1; SendClientMessageToAll(-1,\"valaki rendõrlett\"); munka[playerid][mento] = 0; munka[playerid][tuzolto] = 0; return 1;}CMD:mento(playerid,params[]){ if(munka[playerid][mento] == 1) return 0; munka[playerid][mento] = 1; SendClientMessageToAll(-1,\"valaki mentõslett\"); munka[playerid][rendor] = 0; munka[playerid][tuzolto] = 0; return 1;}CMD:tuzolto(playerid,params[]){ if(munka[playerid][tuzolto] == 1) return 0; munka[playerid][tuzolto] = 1; SendClientMessageToAll(-1,\"valaki tûzoltólett\"); munka[playerid][mento] = 0; munka[playerid][rendor] = 0; return 1;}CMD:radio(playerid,params[]){ new text[128],name[24],str[128]; if(sscanf(params,\"s[128]\",text)) return SendClientMessage(playerid,-1,\"/radio [üzi]\"); if(munka[playerid][rendor] == 1) { for(new i; i < MAX_PLAYERS; i++) { if(munka[rendor]) { GetPlayerName(playerid,name,24);format(str,128,\"RendõrCHAT %s: %s\",name,text); SendClientMessage(i,0x00ff00ff,str); } } } if(munka[playerid][mento] == 1) { for(new i; i < MAX_PLAYERS; i++) { if(munka[mento]) { GetPlayerName(playerid,name,24);format(str,128,\"MentõsCHAT %s: %s\",name,text); SendClientMessage(i,0x00ff00ff,str); } } } if(munka[playerid][tuzolto] == 1) { for(new i; i < MAX_PLAYERS; i++) { if(munka[tuzolto]) { GetPlayerName(playerid,name,24);format(str,128,\"TûzoltóCHAT %s: %s\",name,text); SendClientMessage(i,0x00ff00ff,str); } } } if(munka[playerid][rendor] == 0 || munka[playerid][mento] == 0 || munka[playerid][tuzolto] == 0) return SendClientMessage(playerid,-1,\"Hova akarsz írni???\"); return 1;}
enum munka { rendor, mento, tuzolto,};new MunkaInfo[MAX_PLAYERS][munka];
#include a_samp#include zcmd#include sscanf#include foreach#define rendor 1#define mentos 2#define tuzolto 3new Munka[MAX_PLAYERS];forward fizetes(playerid);public OnPlayerConnect(playerid){SetTimerEx(\"fizetes\", 20*60000, true, \"i\", playerid);return 1;}CMD:rendor(playerid){new string[128], nev[MAX_PLAYER_NAME];format(string, sizeof(string), \"%s rendõr lett!\", nev);Munka[playerid] = rendor;SendClientMessageToAll(-1, string);return 1;}CMD:mentos(playerid){new string[128], nev[MAX_PLAYER_NAME];format(string, sizeof(string), \"%s mentõs lett!\", nev);Munka[playerid] = mentos;SendClientMessageToAll(-1, string);return 1;}CMD:tuzoltos(playerid){new string[128], nev[MAX_PLAYER_NAME];format(string, sizeof(string), \"%s tûzoltós lett!\", nev);Munka[playerid] = tuzolto;SendClientMessageToAll(-1, string);return 1;}CMD:felmond(playerid){new string[128], nev[MAX_PLAYER_NAME];format(string, sizeof(string), \"%s felmondott!\", nev);Munka[playerid] = 0;SendClientMessageToAll(-1, string);return 1;}CMD:munkahelp(playerid){SendClientMessage(playerid, -1, \"/rendor /mentos /tuzoltos | Felmondás: /felmond\");return 1;}CMD:radio(playerid, params[]){new string[128], nev[MAX_PLAYER_NAME], szoveg[128];if(sscanf(params, \"s[128]\", szoveg)) return SendClientMessage(playerid, -1, \"Használat: /radio [szöveg]\");GetPlayerName(playerid, nev, sizeof(nev));if(Munka[playerid] == rendor){format(string, sizeof(string), \"Rendõr, %s mondja: %s\", nev, szoveg);foreach(Player, i){ if(Munka == rendor) return SendClientMessage(i, -1, string);}}if(Munka[playerid] == mentos){format(string, sizeof(string), \"Mentõs, %s mondja: %s\", nev, szoveg);foreach(Player, i){ if(Munka == mentos) return SendClientMessage(i, -1, string);}}if(Munka[playerid] == tuzolto){ format(string, sizeof(string), \"Tûzoltós, %s mondja: %s\", nev, szoveg);foreach(Player, i){ if(Munka == tuzolto) return SendClientMessage(i, -1, string);}}if(Munka[playerid] == 0) return SendClientMessage(playerid, -1, \"Nincs munkád! Ha szeretnél /munkahelp!\");return 1;}public fizetes(playerid){if(Munka[playerid] == 0) return SendClientMessage(playerid, -1, \"Ha dolgozni szeretnél nézd meg a munkákat. /munkahelp\");GivePlayerMoney(playerid, 20000);SendClientMessage(playerid, -1, \"Megkaptad a fizetésedet! $20000\");return 1;}
public OnPlayerSpawn(playerid){if(Munka[playerid] == rendor) SetPlayerPos(playerid, 2318.6741,2450.1377,10.8203); // Rendõr spawnreturn 1;}
#include a_samp#include zcmd#include sscanf#include foreach#define rendor 1#define mentos 2#define tuzolto 3new Munka[MAX_PLAYERS];new Simaskin[MAX_PLAYERS];forward fizetes(playerid);public OnPlayerConnect(playerid){SetTimerEx(\"fizetes\", 20*60000, true, \"i\", playerid);return 1;}CMD:rendor(playerid){new string[128], nev[MAX_PLAYER_NAME];Simaskin[playerid] = GetPlayerSkin(playerid);format(string, sizeof(string), \"%s rendõr lett!\", nev);Munka[playerid] = rendor;SendClientMessageToAll(-1, string);SetPlayerSkin(playerid, 0); // Munkaskinreturn 1;}CMD:mentos(playerid){if(Munka[playerid] > 0) return SendClientMessage(playerid, -1, \"Már dolgozol, elõbb mondj fel!\");new string[128], nev[MAX_PLAYER_NAME];Simaskin[playerid] = GetPlayerSkin(playerid);format(string, sizeof(string), \"%s mentõs lett!\", nev);Munka[playerid] = mentos;SendClientMessageToAll(-1, string);SetPlayerSkin(playerid, 0); // Munkaskinreturn 1;}CMD:tuzoltos(playerid){if(Munka[playerid] > 0) return SendClientMessage(playerid, -1, \"Már dolgozol, elõbb mondj fel!\");new string[128], nev[MAX_PLAYER_NAME];Simaskin[playerid] = GetPlayerSkin(playerid);format(string, sizeof(string), \"%s tûzoltós lett!\", nev);Munka[playerid] = tuzolto;SendClientMessageToAll(-1, string);SetPlayerSkin(playerid, 0); // Munkaskinreturn 1;}CMD:felmond(playerid){if(Munka[playerid] > 0) return SendClientMessage(playerid, -1, \"Már dolgozol, elõbb mondj fel!\");new string[128], nev[MAX_PLAYER_NAME];Simaskin[playerid] = GetPlayerSkin(playerid);format(string, sizeof(string), \"%s felmondott!\", nev);Munka[playerid] = 0;SendClientMessageToAll(-1, string);SetPlayerSkin(playerid, Simaskin[playerid]); // Alap skinreturn 1;}CMD:munkahelp(playerid){SendClientMessage(playerid, -1, \"/rendor /mentos /tuzoltos | Felmondás: /felmond\");return 1;}CMD:radio(playerid, params[]){new string[128], nev[MAX_PLAYER_NAME], szoveg[128];if(sscanf(params, \"s[128]\", szoveg)) return SendClientMessage(playerid, -1, \"Használat: /radio [szöveg]\");GetPlayerName(playerid, nev, sizeof(nev));if(Munka[playerid] == rendor){format(string, sizeof(string), \"Rendõr, %s mondja: %s\", nev, szoveg);foreach(Player, i){ if(Munka == rendor) return SendClientMessage(i, -1, string);}}if(Munka[playerid] == mentos){format(string, sizeof(string), \"Mentõs, %s mondja: %s\", nev, szoveg);foreach(Player, i){ if(Munka == mentos) return SendClientMessage(i, -1, string);}}if(Munka[playerid] == tuzolto){ format(string, sizeof(string), \"Tûzoltós, %s mondja: %s\", nev, szoveg);foreach(Player, i){ if(Munka == tuzolto) return SendClientMessage(i, -1, string);}}if(Munka[playerid] == 0) return SendClientMessage(playerid, -1, \"Nincs munkád! Ha szeretnél /munkahelp!\");return 1;}public fizetes(playerid){if(Munka[playerid] == 0) return SendClientMessage(playerid, -1, \"Ha dolgozni szeretnél nézd meg a munkákat. /munkahelp\");GivePlayerMoney(playerid, 20000);SendClientMessage(playerid, -1, \"Megkaptad a fizetésedet! $20000\");return 1;}public OnPlayerSpawn(playerid){if(Munka[playerid] == rendor) SetPlayerPos(playerid, 2318.6741,2450.1377,10.8203); // Rendõr spawnreturn 1;}