existe um atraso no servidor que ainda consegue pegar a arma na mão do jogador mesmo depois dela ser removida não use isso pra banir o jogador não tem precisão alguma
#define HOLDING(%0) \
((newkeys & (%0)) == (%0))
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) Kick(playerid);
// ou
if(IsPlayerInAnyVehicle(playerid)) Kick(playerid);
// vai dar o mesmo resultado
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SetPlayerArmedWeapon(playerid, 0);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(HOLDING( KEY_FIRE ))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerWeapon(playerid) == 29)
{
Kick(playerid);
}
}
}
if(HOLDING( KEY_FIRE | KEY_LOOK_RIGHT ))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerWeapon(playerid) == 29)
{
Kick(playerid);
}
}
}
if(HOLDING( KEY_FIRE | KEY_LOOK_LEFT ))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerWeapon(playerid) == 29)
{
Kick(playerid);
}
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SetPlayerArmedWeapon(playerid, 0);
}
// remova se o jogador tiver sendo constante mente kickado
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
if(GetPlayerWeapon(playerid) != 0) Kick(playerid);
}
return 1;
}
#define HOLDING(%0) \
((newkeys & (%0)) == (%0))
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) Kick(playerid);
// ou
if(IsPlayerInAnyVehicle(playerid)) Kick(playerid);
// vai dar o mesmo resultado
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SetPlayerArmedWeapon(playerid, 0);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(HOLDING( KEY_FIRE ))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerWeapon(playerid) == 29)
{
Kick(playerid);
}
}
}
if(HOLDING( KEY_FIRE | KEY_LOOK_RIGHT ))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerWeapon(playerid) == 29)
{
Kick(playerid);
}
}
}
if(HOLDING( KEY_FIRE | KEY_LOOK_LEFT ))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerWeapon(playerid) == 29)
{
Kick(playerid);
}
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SetPlayerArmedWeapon(playerid, 0);
}
// remova se o jogador tiver sendo constante mente kickado
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
if(GetPlayerWeapon(playerid) != 0) Kick(playerid);
}
return 1;
}