View Single Post
Old 07/06/2008, 03:50 PM   #17
boemeles
Big Clucker
 
Join Date: Aug 2007
Posts: 135
Reputation: 1
Default Re: Useful Functions

SafeKill(playerid);
Makes you spawn without losing weapons
pawn Code:
stock SafeKill(playerid)
{
  new Weapons[MAX_PLAYERS][11], Ammo[MAX_PLAYERS][11]; // news
  for(new j=0; j<11; j++)   GetPlayerWeaponData(playerid, j, Weapons[playerid][j], Ammo[playerid][j]);// loop through all weapon slots + ammo
  SpawnPlayer(playerid); //respawn the player
  for(new j=0; j<11; j++)   GivePlayerWeapon(playerid, Weapons[playerid][j], Ammo[playerid][j]);// loop through all weapon slots + ammo
}

yes, i know this can be abused, but i made this keeping in mind how stupid it is to somehow be stuck, do /kill, and have to start all over...
boemeles is offline   Reply With Quote