20.01.2011, 17:08
Alguйm teria alguma forma? Tentei, tentei e nгo consegui. Preciso disso, pra saber realmente se o player estб atirando.
Atй mais.
Atй mais.
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys)
{
if ( newkeys == KEY_FIRE)
{
SendClientMessage(playerid,COR,"Vocк ta atirando RIARIAIRAIAR");
}
return 1;
}
public OnPlayerUpdate(playerid)
{
static Count,Ammo,Ping;
Ping = GetPlayerPing(playerid);
if(Count > Ping - (Ping / 2))
{
if(Ammo != GetPlayerAmmo(playerid))
{
Count = 0;
//municao perdida
}
}
else
{
Ammo = GetPlayerAmmo(playerid);
++Count;
}
return true;
}
public OnPlayerUpdate(playerid)
{
static Count,Ammo,Ping;
Ping = GetPlayerPing(playerid);
if(Count > Ping - (Ping / 2))
{
if(Ammo != GetPlayerAmmo(playerid))
{
Count = 0;
//municao perdida
}
}
else
{
Ammo = GetPlayerAmmo(playerid);
++Count;
}
return true;
}