/fixveh command messed up
#6

ZCMD and SSCANF:

pawn Код:
command(vrepair, playerid, params[])
{
    #pragma unused params
    new string[128];
    if(PlayerStatistics[playerid][pAdminLevel] < 3)
        return false;
    if(!IsPlayerConnected(playerid))
        return SendClientMessage(playerid, COLOR_WHITE, "You are not logged in!");
    if(!IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid, COLOR_WHITE, "You are not in a vehicle!");

    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, COLOR_WHITE, "You have fixed your vehicle.");
    return 1;
}
It checks if the person who executed the command is in a vehicle, if they are, it continues if not, it won't. You'll have to edit the admin check to your liking. Hope this helps.
Reply


Messages In This Thread
/fixveh command messed up - by jurtes - 16.10.2010, 12:27
Re: /fixveh command messed up - by Cameltoe - 16.10.2010, 12:38
Re: /fixveh command messed up - by boelie - 16.10.2010, 12:42
Re: /fixveh command messed up - by jurtes - 16.10.2010, 14:15
Re: /fixveh command messed up - by Rachael - 16.10.2010, 14:49
Re: /fixveh command messed up - by Scenario - 16.10.2010, 15:33
Re: /fixveh command messed up - by [NoV]LaZ - 16.10.2010, 15:41
Re: /fixveh command messed up - by Scenario - 16.10.2010, 15:49
Re: /fixveh command messed up - by Rachael - 16.10.2010, 16:18
Re: /fixveh command messed up - by jurtes - 17.10.2010, 09:12

Forum Jump:


Users browsing this thread: 2 Guest(s)