#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;}
#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];GetPlayerName(playerid, nev, sizeof(nev));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];GetPlayerName(playerid, nev, sizeof(nev));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];GetPlayerName(playerid, nev, sizeof(nev));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];GetPlayerName(playerid, nev, sizeof(nev));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;}