[HELP]CMD:VCAr please
#1

Script
pawn Код:
CMD:vcar(playerid, params[])
{
    new sendername[MAX_PLAYER_NAME],string[256];
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pVip] >= 1)
        {
            SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar nu ai acces la aceasta comanda.");
            return 1;
        }
        if(strval(params))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /veh [carid] [color1] [color2]");
            return 1;
        }
        new car;
        car = strval(params);
        if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar Vehiculele sunt intre 400 si 611."); return 1; }
        if(strval(params))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /veh [carid] [color1] [color2]");
            return 1;
        }
        new color1;
        color1 = strval(params);
        if(color1 < 0 || color1 > 200000000) { SendClientMessage(playerid, COLOR_GREY, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar culorile sunt intre 0 si 126."); return 1; }
        if(strval(params))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /vcar [carid] [color1] [color2]");
            return 1;
        }
        new color2;
        color2 = strval(params);
        if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar culorile sunt intre 0 si 126."); return 1; }
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid, X,Y,Z);
        new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
        CreatedCars[CreatedCar] = carid;
        CreatedCar ++;
        MasinaSpawnata[carid] = 1;
        format(string, sizeof(string), "» Vehicul [%d] Spawnat.", carid);
        SendClientMessage(playerid, COLOR_GREY, string);
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, 256, ""#GAlbastru"[Suceava-RPG]: {ff6347} %s a spawnat %d [Vehicle].", sendername,car);
        SendAdminMessage(0x9D9D4FFF, string);
    }
    return 1;
}
It doesn't give any errors but I am VIP level 2 in game and it says : {ffffff}Ne pare rau, dar nu ai acces la aceasta comanda. Meaning : You are not authorized to use that command !

Why ?
Reply
#2

change this

pawn Код:
if (PlayerInfo[playerid][pVip] >= 1)
to this

pawn Код:
if (PlayerInfo[playerid][pVip] < 1)
Reply
#3

it works but now it gives me in game when I type /vcar it show me this message

pawn Код:
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar Vehiculele sunt intre 400 si 611."); return 1; }
        if(strval(params))
and it was not supposed to why?
Reply
#4

Did you type a car ID higher than 400 and below 611?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)