guhgames

Save Weapons

Apr 29th, 2013
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.75 KB | None | 0 0
  1. //Code para salvar armas
  2. public OnPlayerDisconnect(playerid, reason)
  3. {
  4.     new Arma[13], Bala[13],Arma_[30],Bala_[30];
  5.     for(new i = 0; i < 13; i++)
  6.     {
  7.         GetPlayerWeaponData(playerid,i,arma[i],bala[i]);
  8.         format(Arma_,20,"Arma%d",i);
  9.         format(Bala_,20,"Bala%d",i);
  10.         DOF2_SetInt(GetarConta(playerid), Arma_, arma[i]);
  11.         DOF2_SetInt(GetarConta(playerid), Bala_, bala[i]);
  12.     }
  13.     return 1;
  14. }
  15.  
  16. public OnPlayerSpawn(playerid)
  17. {
  18.     new Arma_[30],Bala_[30];
  19.     for(new i = 0; i > 13; i++)
  20.     {
  21.         format(Arma_, 20,"Arma%d",i);
  22.         format(Bala_,20,"Bala%d",i);
  23.         GivePlayerWeapon(playerid,DOF2_GetInt(GetarConta(playerid),Arma_),DOF2_GetInt(GetarConta(playerid),Bala_));
  24.     }
  25.     return 1;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment