Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <dini>
- enum Waffen_Info
- {
- wslot,wslot1,wslot2,wslot3,wslot4,wslot5,wslot6,wslot7,wslot8,wslot9,wslot10,wslot11,
- aslot,aslot1,aslot2,aslot3,aslot4,aslot5,aslot6,aslot7,aslot8,aslot9,aslot10,aslot11
- };
- new wInfo[MAX_PLAYERS][Waffen_Info];
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Waffen Speichern/Laden by Sven");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Waffen Speichern/Laden by Sven");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- WaffenSpeichern(playerid);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- WaffenLaden(playerid);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot],wInfo[playerid][aslot]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot1],wInfo[playerid][aslot1]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot2],wInfo[playerid][aslot2]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot3],wInfo[playerid][aslot3]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot4],wInfo[playerid][aslot4]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot5],wInfo[playerid][aslot5]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot6],wInfo[playerid][aslot6]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot7],wInfo[playerid][aslot7]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot8],wInfo[playerid][aslot8]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot9],wInfo[playerid][aslot9]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot10],wInfo[playerid][aslot10]);
- GivePlayerWeapon(playerid,wInfo[playerid][wslot11],wInfo[playerid][aslot11]);
- 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[])
- {
- 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;
- }
- stock WaffenSpeichern(playerid)
- {
- new waffe,ammo,save[40],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(save,sizeof(save),"/Waffen/%s.ini",name);
- //____________________________________Waffen Speichern____________________________________
- GetPlayerWeaponData(playerid,0,waffe,ammo);
- dini_IntSet(save,"waslot",waffe);
- dini_IntSet(save,"amslot",ammo);
- GetPlayerWeaponData(playerid,1,waffe,ammo);
- dini_IntSet(save,"waslot1",waffe);
- dini_IntSet(save,"amslot1",ammo);
- GetPlayerWeaponData(playerid,2,waffe,ammo);
- dini_IntSet(save,"waslot2",waffe);
- dini_IntSet(save,"amslot2",ammo);
- GetPlayerWeaponData(playerid,3,waffe,ammo);
- dini_IntSet(save,"waslot3",waffe);
- dini_IntSet(save,"amslot3",ammo);
- GetPlayerWeaponData(playerid,4,waffe,ammo);
- dini_IntSet(save,"waslot4",waffe);
- dini_IntSet(save,"amslot4",ammo);
- GetPlayerWeaponData(playerid,5,waffe,ammo);
- dini_IntSet(save,"waslot5",waffe);
- dini_IntSet(save,"amslot5",ammo);
- GetPlayerWeaponData(playerid,6,waffe,ammo);
- dini_IntSet(save,"waslot6",waffe);
- dini_IntSet(save,"amslot6",ammo);
- GetPlayerWeaponData(playerid,7,waffe,ammo);
- dini_IntSet(save,"waslot7",waffe);
- dini_IntSet(save,"amslot7",ammo);
- GetPlayerWeaponData(playerid,8,waffe,ammo);
- dini_IntSet(save,"waslot8",waffe);
- dini_IntSet(save,"amslot8",ammo);
- GetPlayerWeaponData(playerid,9,waffe,ammo);
- dini_IntSet(save,"waslot9",waffe);
- dini_IntSet(save,"amslot9",ammo);
- GetPlayerWeaponData(playerid,10,waffe,ammo);
- dini_IntSet(save,"waslot10",waffe);
- dini_IntSet(save,"amslot10",ammo);
- GetPlayerWeaponData(playerid,11,waffe,ammo);
- dini_IntSet(save,"waslot11",waffe);
- dini_IntSet(save,"amslot11",ammo);
- return 1;
- }
- stock WaffenLaden(playerid)
- {
- new save[40],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(save,sizeof(save),"/Waffen/%s.ini",name);
- //____________________________________Waffen Laden____________________________________
- wInfo[playerid][wslot] =dini_Int(save,"waslot");
- wInfo[playerid][wslot1] =dini_Int(save,"waslot1");
- wInfo[playerid][wslot2] =dini_Int(save,"waslot2");
- wInfo[playerid][wslot3] =dini_Int(save,"waslot3");
- wInfo[playerid][wslot4] =dini_Int(save,"waslot4");
- wInfo[playerid][wslot5] =dini_Int(save,"waslot5");
- wInfo[playerid][wslot6] =dini_Int(save,"waslot6");
- wInfo[playerid][wslot7] =dini_Int(save,"waslot7");
- wInfo[playerid][wslot8] =dini_Int(save,"waslot8");
- wInfo[playerid][wslot9] =dini_Int(save,"waslot9");
- wInfo[playerid][wslot10] =dini_Int(save,"waslot10");
- wInfo[playerid][wslot11] =dini_Int(save,"waslot11");
- wInfo[playerid][aslot] =dini_Int(save,"amslot");
- wInfo[playerid][aslot1] =dini_Int(save,"amslot1");
- wInfo[playerid][aslot2] =dini_Int(save,"amslot2");
- wInfo[playerid][aslot3] =dini_Int(save,"amslot3");
- wInfo[playerid][aslot4] =dini_Int(save,"amslot4");
- wInfo[playerid][aslot5] =dini_Int(save,"amslot5");
- wInfo[playerid][aslot6] =dini_Int(save,"amslot6");
- wInfo[playerid][aslot7] =dini_Int(save,"amslot7");
- wInfo[playerid][aslot8] =dini_Int(save,"amslot8");
- wInfo[playerid][aslot9] =dini_Int(save,"amslot9");
- wInfo[playerid][aslot10] =dini_Int(save,"amslot10");
- wInfo[playerid][aslot11] =dini_Int(save,"amslot11");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement