Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *Scripted by burnfire!
- *Created for GTA.Know.RO server
- */
- /*SOF*/
- /*Includes*/
- #include <a_samp>
- #include <sscanf>
- #include <zcmd>
- #include <SII>
- /*ENUMS AND NEWS*/
- enum gPlayerInfo
- {
- level,
- vip,
- score,
- coins,
- cash,
- log,
- reg
- }
- new PInfo[MAX_PLAYERS][gPlayerInfo];
- /*DEFINES*/
- #define file "BAdmin/Profiles/%s.ini"
- #define WELCOME 0
- #define LOGIN 1
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Badmin is loading...");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Badmin is unloading...");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- { PInfo[playerid][level] = 0;
- PInfo[playerid][vip] = 0;
- PInfo[playerid][score] = 0;
- PInfo[playerid][coins] = 0;
- PInfo[playerid][cash] = 0;
- if(!fexist(file)) {ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Register","Te rugam sa te inregistrezi mai jos","Register","Kick");SendClientMessage(playerid,0x66FF00FF,"Bine ai venit pe GTA.Know.RO!Te rugam sa te inregistrezi mai jos!");}
- if(fexist(file)) {ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","Te rugam sa te loghezi mai jos!","Login","Kick");SendClientMessage(playerid,0x66FF00FF,"Bine ai revenit!Te rugam sa te loghezi mai jos!");}
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 0)
- {
- if(response)
- {
- new password = inputtext[128];
- new string[128];
- INI_Open(file);
- INI_WriteString(file,"Parola",password);
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,"pName",sizeof(pName));
- INI_WriteString(file,"Nume",pName);
- INI_WriteInt("Level",PInfo[playerid][level]);
- INI_WriteInt("Cash",PInfo[playerid][cash]);
- INI_WriteInt("Coins",PInfo[playerid][coins]);
- INI_WriteInt("Score",PInfo[playerid][score]);
- SendClientMessage(playerid,0x66FF00FF,"Te-ai inregistrat cu succes!!!");
- format(string,128,"Te-ai inregistrat cu succes %s cu parola %s !!!",pName,password);
- SendClientMessage(playerid,0x66FF00FF,string);
- }
- else
- {
- SendClientMessage(playerid,0xFF0000FF,"Nu te-ai inregistrat!Ai primit KICK!!!");
- Kick(playerid);
- }
- }
- if(dialogid == 1)
- {
- if(!response)
- {
- SendClientMessage(playerid,0xFF0000FF,"Nu te-ai logat!Vei primi KICK!!!");
- Kick(playerid);
- }
- else
- {
- INI_Open(file);
- new password2[128];
- INI_ReadString("Parola",password2);
- if(!strcmp(password2, inputtext))
- {
- SendClientMessage(playerid,0xFF0000FF,"Parola introdusa este gresita!");
- INI_Close();
- }
- PInfo[playerid][level] = INI_ReadInt("Level");
- PInfo[playerid][cash] = INI_ReadInt("Cash");
- PInfo[playerid][coins] = INI_ReadInt("Coins");
- PInfo[playerid][score] = INI_ReadInt("Score");
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment