Get back the weapons
#1

Hello! i need some help but i don't have any idea of how start this... i'm making a arena system for my RPG server. i want to make a system that remove the weapons from the player before he enter on arena and give it back when he exits...can you help me?
Reply
#2

Save the player weapons when he join the arena, and when he leave, give him the weapons back.
This may help you
http://pastebin.com/TaD5miwQ
Reply
#3

Quote:
Originally Posted by SonicFreeStyle
Посмотреть сообщение
Hello! i need some help but i don't have any idea of how start this... i'm making a arena system for my RPG server. i want to make a system that remove the weapons from the player before he enter on arena and give it back when he exits...can you help me?
Save the Weapon ID With SetPVarInt ... and to Get the Weapon data you can Use "GetPlayerWeaponData" !
Reply
#4

Код:
new aOldWeapon[MAX_PLAYERS][13],OldAmmo[MAX_PLAYERS][13];
//this is where you are saving weapon before enter in area .
		  		for(new i; i < 13; ++i)
				{
					GetPlayerWeaponData(playerid, i, aOldWeapon[playerid][i], OldAmmo[playerid][i]);
				}

//this is when you leave arena.
//if u give anyweapon in arena then use ResetPlayerWeapons other wise not needed.
				ResetPlayerWeapons(playerid);
				for(new i; i < 13; ++i)
				{
					GivePlayerWeapon(playerid, aOldWeapon[playerid][i], OldAmmo[playerid][i]);
				}
//this give player his weapons.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)