Advertisement
_Sk_

Get Name And Ammu From Slot At Spawn

Jan 29th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. function onPlayerSpawn( player )
  2. {
  3. for(local i=0;i<=8;i++)
  4. {
  5. local w_id = player.GetWeaponAtSlot(i),w_ammo=player.GetAmmoAtSlot(i),w_name=GetWeaponName(w_id);
  6. if (w_id!=0) //it will ignore 0 Which is UnArmed(Fist) As All Empty Slots Will Return 0.
  7. MessagePlayer("[#FFFFFF]You Got Your : [#FFFF00][ [#006400]"+w_name+" [#FFFF00]][#FFFFFF] With Ammo : [#FFFF00][ [#006400]"+w_ammo+" [#FFFF00]][#FFFFFF] At Slot : [#FFFF00][ [#006400]"+i+" [#FFFF00]][#FFFFFF].",player);
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement