Advertisement
Cayosen

Morrer ir para o HP

Nov 6th, 2022
2,234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.67 KB | Source Code | 0 0
  1. /*
  2.     System: Dead
  3.     Author: ╭໑˚🖤『Cauã』₊꒷꒦#1125
  4. */
  5.  
  6. #define FILTERSCRIPT
  7.  
  8. #include <a_samp>
  9.  
  10. #if MAX_PLAYERS != 100
  11.     #undef MAX_PLAYERS
  12.     #define MAX_PLAYERS 100
  13. #endif
  14.  
  15. new bool:IsDeath[MAX_PLAYERS];
  16.  
  17. public OnPlayerSpawn(playerid)
  18. {
  19.     if(IsDeath[playerid]) {
  20.         SetPlayerPos(playerid, X, Y, Z);
  21.         GivePlayerMoney(playerid, GetPlayerMoney(playerid));
  22.         SendClientMessage(playerid, -1, "Você morreu e foi para o hospital"); //após a morte vc perde todo o dinheiro
  23.         IsDeath[playerid] = false;
  24.     }
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerDeath(playerid, killerid, reason)
  29. {
  30.     IsDeath[playerid] = true;
  31.     return 1;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement