CMD:vr(playerid, params[]) dont work :(
#1

EDIT: its fixed

When i type this cmd

it returns INVALID_CMD ( message sends "unkown command" ) xD

here is the command

pawn Код:
PUBLIC:vr(playerid, vehicleid)
{
    new Float:x,Float:y,Float:z;
    GetVehiclePos(vehicleid, x,y,z);
    if(IsPlayerInRangeOfPoint(playerid, 3.0,x,y,z)) {
        new Float:health; GetVehicleHealth(vehicleid, health);
        if(health < 100) {
            SetVehicleHealth(vehicleid, health+15);
        }else {
            SetVehicleHealth(vehicleid, 100.0);
            KillTimer(Timer1[playerid]);
            SendClientMessage(playerid, COLOR_RED,"[ERROR] Vehicle is repaired");
        }
    }
    return 1;
}

CMD:rv(playerid, params[])
{
    if(IsPlayerVS[playerid] == 0) {
        SendClientMessage(playerid, COLOR_RED,"[ERROR] You cant use this command, only Vehicle Support can");
        return 1;
    }
    new vehicleid;
    if(sscanf(params,"i",vehicleid)) {
        SendClientMessage(playerid, COLOR_GREY,"[USAGE] /rv [vehicleid]");
        return 1;
    }
    if(vehicleid == INVALID_VEHICLE_ID) {
        SendClientMessage(playerid, COLOR_RED,"[ERROR] Invalid ID");
        return 1;
    }
    new Float:x,Float:y,Float:z;
    GetVehiclePos(vehicleid, x,y,z);
    if(IsPlayerInRangeOfPoint(playerid, 3.0,x,y,z)) {
        Timer1[playerid] = SetTimerEx("vr",500,0,"ii",playerid,vehicleid);
    }else {
        SendClientMessage(playerid, COLOR_RED,"[ERROR] Your not near that vehicle");
    }
    return 1;
}
Reply


Messages In This Thread
CMD:vr(playerid, params[]) dont work :( - by dr.lozer - 15.12.2012, 05:07
Re: CMD:vr(playerid, params[]) dont work :( - by [HK]Ryder[AN] - 15.12.2012, 05:08
Re: CMD:vr(playerid, params[]) dont work :( - by RajatPawar - 15.12.2012, 05:10
Re: CMD:vr(playerid, params[]) dont work :( - by dr.lozer - 15.12.2012, 05:11
Re: CMD:vr(playerid, params[]) dont work :( - by dr.lozer - 15.12.2012, 05:20
Re: CMD:vr(playerid, params[]) dont work :( - by [HK]Ryder[AN] - 15.12.2012, 05:26

Forum Jump:


Users browsing this thread: 1 Guest(s)