trying to create fixveh and fixvehall commands
#2

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#define COLOR_GREY  0x00000041

enum playervEnum
{
     pAdminLevel
};

new
   playerVariables[MAX_PLAYERS][playervEnum];

CMD:fixvehall(playerid, params[])
{
    if(playerVariables[playerid][pAdminLevel] >= 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
        SetVehicleHealth(i, 1000.0);
        RepairVehicle(i);
    }
    SendClientMessage(playerid, COLOR_GREY, "All vehicles fixed.");
    return 1;
}


CMD:fixveh (playerid, params[])
{
    if(playerVariables[playerid][pAdminLevel] >= 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        RepairVehicle(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid, COLOR_GREY, "   You have fixed your vehicle !");
    }
    return 1;
}
Reply


Messages In This Thread
trying to create fixveh and fixvehall commands - by Jhony_Blaze - 29.12.2013, 21:04
Re: trying to create fixveh and fixvehall commands - by Konstantinos - 29.12.2013, 21:09
Re: trying to create fixveh and fixvehall commands - by Jhony_Blaze - 29.12.2013, 21:20

Forum Jump:


Users browsing this thread: 1 Guest(s)