#include <a_samp>#include <zcmd>#include <sscanf>#include <dutils>#include <dini>#include <dudb>#include <time>#define COLOR_GREY 0xAFAFAFAA#define COLOR_GREEN 0x33AA33AA#define COLOR_RED 0xAA3333AA#define COLOR_YELLOW 0xFFFF00AA#define COLOR_WHITE 0xFFFFFFAA#define COLOR_ORANGE 0xFF9933AA#define DIALOG_0 1#define DIALOG_1 2new file[128];enum Info{Jelszo,Pont,Penz,Halalok,Olesek,}new pInfo[MAX_PLAYERS][info];public OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" RupReg by Rupert\");print(\"--------------------------------------\\n\");return 1;}CMD:kill(playerid, params[]){SetPlayerHealth(playerid, 0);return 1;}CMD:stats(playerid, params[]){new str[256], nev[MAX_PLAYER_NAME];format(file,sizeof(file), \"%s.ini\", nev);GetPlayerName(playerid, nev, sizeof(nev));format(str, sizeof(str), \"Neved: %s || Halálok: %d || Ölések: %d || Pénz: %d || Pont: %d\", nev, pInfo[playerid][Halalok], pInfo[playerid][Olesek], GetPlayerMoney(playerid), GetPlayerScore(playerid));SendClientMessage(playerid, COLOR_WHITE, str);return 1;} public OnPlayerConnect(playerid){new pName[MAX_PLAYER_NAME];new str[128];GetPlayerName(playerid, pName, sizeof(pName));format(str, sizeof(str), \"%s csatlakozott a szerverre!\", pName);SendClientMessageToAll(0xFFFF00AA, str);new PlayerName[MAX_PLAYER_NAME];GetPlayerName(playerid, PlayerName, sizeof(PlayerName));format(file, sizeof(file), \"%s.ini\", PlayerName); if(!dini_Exists(file)){ ShowPlayerDialog(playerid, DIALOG_0, DIALOG_STYLE_INPUT, \"Regisztráció\", \"Kérlek, írd be a használni kívánt jelszavad!\", \"Regisztrál\", \"Kirúg\");}else{ ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_INPUT, \"Bejelentkezés\", \"Kérlek, írd be a jelszavad!\", \"Rendben\", \"Kirúg\");}return 1;}public OnPlayerDisconnect(playerid, reason){ dini_IntSet(file, \"Pénz\", GetPlayerMoney(playerid));dini_IntSet(file, \"Pont\", GetPlayerScore(playerid));dini_IntSet(file, \"Halálok\", pInfo[playerid][Halalok]);dini_IntSet(file, \"Ölések\",pInfo[playerid][Olesek]);return 1;}public OnPlayerSpawn(playerid){GivePlayerMoney(playerid, pInfo[playerid][Penz]);SetPlayerScore(playerid, pInfo[playerid][Pont]);}public OnPlayerDeath(playerid, killerid, reason){pInfo[playerid][Halalok]++;pInfo[killerid][Olesek]++;pInfo[killerid][Pont]++;return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(!response) { SendClientMessage(playerid, COLOR_RED, \"Így jártál, nem regisztráltál be! \"); Kick(playerid); }if(dialogid == 1){ new PlayerName[MAX_PLAYER_NAME];GetPlayerName(playerid, PlayerName, sizeof(PlayerName));format(file, sizeof(file), \"%s.ini\", PlayerName);dini_Create(file); dini_IntSet(file, \"Jelszó\", udb_hash(inputtext)); dini_IntSet(file, \"Pénz\", GetPlayerMoney(playerid)); dini_IntSet(file, \"Pont\", GetPlayerScore(playerid)); dini_IntSet(file, \"Halálok\",0); dini_IntSet(file, \"Ölések\",0); SendClientMessage(playerid, COLOR_YELLOW, \"Gratulálok, regisztráltál, most viszont írd be a jelszód!\"); ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_INPUT, \"Bejelentkezés\", \"Kérlek, írd be a jelszavad!\", \"Rendben\", \"Kirúg\");}if(dialogid == 2){ if(!response) { SendClientMessage(playerid, COLOR_RED, \"Így jártál, nem jelentkeztél be! \"); Kick(playerid); } if(strval(dini_Get(file, \"Jelszó\")) == udb_hash(inputtext)){ new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(file, sizeof(file), \"%s.ini\", PlayerName); pInfo[playerid][Penz] = dini_Int(file, \"Pénz\"); pInfo[playerid][Pont] = dini_Int(file, \"Pont\"); pInfo[playerid][Halalok] = dini_Int(file, \"Halálok\"); pInfo[playerid][Olesek] = dini_Int(file, \"Ölések\"); GivePlayerMoney(playerid, pInfo[playerid][Penz]); SetPlayerScore(playerid, pInfo[playerid][Pont]); SendClientMessage(playerid, COLOR_YELLOW, \"Sikeresen bejelentkeztél\"); return 1;}else{ SendClientMessage(playerid, COLOR_RED, \"Rossz jelszó!\"); ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_INPUT, \"Bejelentkezés\", \"Kérlek, írd be a jelszavad!\", \"Rendben\", \"Kirúg\"); }}return 1;}
#include <a_samp>#include <zcmd>#include <sscanf>#include <dutils>#include <dini>#include <dudb>#include <time>
CMD:myweather(playerid, params[]){new hour, string[128];if(sscanf(params, \"d\", hour)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /myweather <Idõjárás ID>\");if(hour > 53 && hour != 700 && hour != 150) return SendClientMessage(playerid, 0xFF0000AA, \"Rossz idõjárás ID! 0 - 50, 700, 150\");SetPlayerWeather(playerid, hour); format(string, sizeof(string), \"Idõjárásod beállítva! ID: %d\", hour);SendClientMessage(playerid, 0xFF9900AA, string);return 1;}