Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Fs by [ISS]jumbo
- // :D :D :D :D :D :D :D :D :D Save Last Pos
- //#define FILTERSCRIPT
- #include <a_samp>
- enum Posizione {
- Float:XPos,
- Float:YPos,
- Float:ZPos,
- };
- new Giocatore[MAX_PLAYERS][Posizione];
- new Fdie[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Save Last Pos loaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(Fdie[playerid] == 1)
- {
- ShowPlayerDialog(playerid,4283,DIALOG_STYLE_MSGBOX,"....RESPAWN....","Would you like to respawn where you died?","Yes","No");
- }
- else if(Fdie[playerid] == 0)
- {
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- GetPlayerPos(playerid,Giocatore[playerid][XPos],Giocatore[playerid][YPos],Giocatore[playerid][ZPos]);
- Fdie[playerid]=1;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 4283)
- {
- if(response == 1)
- {
- SendClientMessage(playerid, 0xF60000AA, "ok respawn where you died");
- SetPlayerPos(playerid,Giocatore[playerid][XPos],Giocatore[playerid][YPos],Giocatore[playerid][ZPos]);
- }
- }
- if(dialogid == 4283)
- {
- if(response == 0)
- {
- SendClientMessage(playerid, 0xF60000AA, "ok you will not respawn where you died");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment