pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkey & KEY_SECONDARY_ATTACK)
{
if(GetPlayerVirtualWorld(playerid) == puttheworldhere)
{
//code (range check)
}
else if(GetPlayerVirtualWorld(playerid) == putthesecondworldhere)
{
// code (range check)
}
}
return 1;
}