i want to use this command only for admin....
#3

pawn Код:
public AutoR()
{
    for(new playerid=0; playerid<MAX_PLAYERS; playerid++) {
        if(IsPlayerConnected(playerid)) {
            new Float:health, cid;
            if (IsPlayerInAnyVehicle(playerid)) {
                if(IsPlayerAdmin(playerid)) { // RCON admin only
                    if(IsPlayerInRangeOfPoint(playerid, 15, Float:x, Float:y, Float:z)) { // 15 = The range of the points. Fill in your x, y, and z co-ords.
                        cid = GetPlayerVehicleID(playerid);
                        GetVehicleHealth(cid, health);
                        if (health < 300) {
                            SetVehicleHealth(cid,1000);
                            GameTextForPlayer(playerid, "Vehicul reparat!",2000,5);
                        }
                    }
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)