Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <dini>
- #include <sscanf>
- #include <zcmd>
- enum PlayerData
- {
- pGaraje,
- }
- new PlayerInfo[MAX_PLAYERS][PlayerData];
- enum GarajData
- {
- Float:Intrarex,
- Float:Intrarey,
- Float:Intrarez,
- Float:Iesirex,
- Float:Iesirey,
- Float:Iesirez,
- GarajPropieta[MAX_PLAYER_NAME],
- GarajPret,
- GarajVirtual,
- }
- new PlayerInfo[MAX_PLAYERS][PlayerData];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- 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;
- }
- CMD:cumparagaraj(playerid, params[])
- {
- if(PlayerInfo[playerid][pGaraj] < 3)
- for(i=
- return 1;
- }
- CMD:creategaraj(playerid, params[])
- {
- new file[256],mopdelid,pret;
- if(unformat(params, "ii", modelid,pret))
- {
- SendClientMessage(playerid, 0xFF0000AA, "Usage: /creategaraj <modelid> <pret>");
- return 1;
- }
- if(modelid < 0 && modelid > 6)
- {
- SendClientMessage(playerid, 0xFF0000AA, "Model-ul pot fi de la 1 la 5");
- return 1;
- }
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x,y,z)
- if(IsPlayerAdmin(playerid))
- {
- for(new i= 1; i<=maxgaraje; i++)
- {
- format(file, sizeof(file), "Garaje/%d",i);
- if(dini_Exists(file))
- {
- if(modelid)
- {
- GarajInfo[playerid][Intrarex] = x; GarajInfo[playerid][Intrarey] = y; GarajInfo[playerid][Intrarez] = z;
- GarajInfo[playerid][GarajPret] = pret; GarajInfo[playerid][GarajVirtual] = i;
- GarajInfo[playerid][Iesirex] = x; GarajInfo[playerid][Iesirey] = y; GarajInfo[playerid][Iesirez] = z;
- strmid(GarajInfo[idx][GarajPropieta], "N/a", 0, strlen("N/a"), 255);
- SaveThisGaraj(i);
- }
- }
- }
- }
- 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[])
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public LoadGaraje()
- {
- new file[512];
- for(new idx=1;idx<maxgarak;idx++)
- {
- format(file, sizeof(file),"Garaje/%d.ini", idx);
- if(dini_Exists(file))
- {
- GarajInfo[idx][Intrarex] = dini_Float(file,"Intrarex");
- GarajInfo[idx][Intrarey] = dini_Float(file,"Intrarey");
- GarajInfo[idx][Intrarez] = dini_Float(file,"Intrarez");
- GarajInfo[idx][Iesirex] = dini_Float(file,"Iesirex");
- GarajInfo[idx][Iesirey] = dini_Float(file,"Iesirey");
- GarajInfo[idx][Iesirez] = dini_Float(file,"Iesirez");
- strmid(GarajInfo[idx][GarajPropieta], dini_Get(file,"Propietar"), 0, strlen(dini_Get(file,"Propietar")), 255);
- GarajInfo[idx][GarajPret] = dini_Int(file,"Pret");
- GarajInfo[idx][GarajVirtual] = dini_Int(file,"Virtual");
- }
- }
- return 1;
- }
- public SaveThisGaraj(garajdid)
- {
- new file2[512];
- format(file2, sizeof(file2),"Garaje/%d.ini", garajdid);
- if(dini_Exists(file2))
- {
- dini_FloatSet(file2,"Intrarex",GaraInfo[garajid][Intrarex]);
- dini_FloatSet(file2,"Intrarey",GaraInfo[garajid][Intrarey]);
- dini_FloatSet(file2,"Intrarez",GaraInfo[garajid][Intrarez]);
- dini_FloatSet(file2,"Iesirex",GaraInfo[garajid][Iesirex]);
- dini_FloatSet(file2,"Iesirey",GaraInfo[garajid][Iesirey]);
- dini_FloatSet(file2,"Iesirez",GaraInfo[garajid][Iesirez]);
- dini_Set(file2,"Propietar",GaraInfo[garajid][GarajPropieta]);
- dini_IntSet(file2,"Pret",GaraInfo[garajid][GarajPret]);
- dini_IntSet(file2,"Virtual",GaraInfo[garajid][GarajVirtual]);
- return 1;
- }
- else if(!dini_Exists(file2))
- {
- dini_Create(file2);
- dini_FloatSet(file2,"Intrarex",GaraInfo[garajid][Intrarex]);
- dini_FloatSet(file2,"Intrarey",GaraInfo[garajid][Intrarey]);
- dini_FloatSet(file2,"Intrarez",GaraInfo[garajid][Intrarez]);
- dini_FloatSet(file2,"Iesirex",GaraInfo[garajid][Iesirex]);
- dini_FloatSet(file2,"Iesirey",GaraInfo[garajid][Iesirey]);
- dini_FloatSet(file2,"Iesirez",GaraInfo[garajid][Iesirez]);
- dini_Set(file2,"Propietar",GaraInfo[garajid][GarajPropieta]);
- dini_IntSet(file2,"Pret",GaraInfo[garajid][GarajPret]);
- dini_IntSet(file2,"Virtual",GaraInfo[garajid][GarajVirtual]);
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement