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
#2

thats cause the command is rv not vr
Reply
#3

Quote:

PUBLIC:vr(playerid, vehicleid)
{
new Float,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;
}

What is this, a new type of command creation? PUBLIC: ?

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
thats cause the command is rv not vr
And lol'ed.
Reply
#4

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
thats cause the command is rv not vr
what?? i didn't understand.. when i said i use /vr

OH!!! the title ops

EDIT: hmmm your right.. maybe i type wrong cmd xD lemme go check this works
Reply
#5

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
What is this, a new type of command creation? PUBLIC: ?


And lol'ed.
dude i use the PUBLIC: like this

pawn Код:
#define PUBLIC:%1(%2) forward %1(%2); public %1(%2)
and by the way i typed in game /vr xD
Reply
#6

so, i was right?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)