oé j'ai trouvé sa
giveAmmo()
{
level endon("disconnect");
for(;;)
{
foreach( player in level.players )
{
if(!isDefined(player.ammoing))
player.ammoing = false;
if(distancesquared(self.origin, player.origin) <= 9732 && !player.ammoing)
{
if(player.sessionstate != "playing")
continue;
player thread ammoWaitThread();
player playlocalsound("weap_pickup");
player giveMaxAmmo(player getCurrentWeapon());
player giveMaxAmmo(player getCurrentOffhand());
}
}
wait 0.05;
}
}
ammoWaitThread()
{
self endon("death");
self endon("disconnect");
self.ammoing = true;
wait 1;
self.ammoing = false;
}
---------- Message ajouté à 10h44 ---------- Le message précédent était à 19h31 ----------