15.11.2014, 08:35
How do I make this code so that it executes when the player is near ANY hitman?
Код:
if(moneys > 0 && playermoney >= moneys) // If player can place contract { for(new i = 0; i < MAX_PLAYERS; i++) // Loop through players and pick out hitmen { if(IsPlayerConnected(i)) continue; if(PlayerInfo[i][pMember] == 8){ new Float:x, Float:y, Float:z; GetPlayerPos(i, x, y, z); if(IsPlayerInRangeOfPoint(playerid, 4.0, x, y, z)){ // Player is near a hitman, send the contract } else { } } } } else { SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount !"); } }