Help converting small script! 2X REP
#1

Hello,
I need some help. I would like somebody to kindly turn this from /veh [CARID] to /veh [CARNAME]. And also to automatically put the player in vehicle. If somebody does this for me i will kindly REP 2x! Thanks!

pawn Код:
CMD:veh(playerid, params[]) {

    new vehid;

    if(sscanf(params, "i", vehid)) SendClientMessage(playerid, COLOR_GREY, "SYNTAX: /veh <carid>");
    else if (vehid < 400 || vehid > 611) SendClientMessage(playerid, COLOR_GREY, "[ERROR] Invalid car id! [ Car ID's range from 400 - 611 ]");
    else if(vehid == 425 || vehid == 520 || vehid == 537 || vehid == 538 || vehid == 569 || vehid == 570 || vehid == 590) return SendClientMessage(playerid, COLOR_RED, "You can't spawn a hydra and the rest military vehicles!");
    else
    {
        if(vCar[playerid] != -1)
        {
            DestroyVehicle(vCar[playerid]);
        }
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        vCar[playerid] = CreateVehicle(vehid, x + 3, y, z, 0, 0,0, -1);
        PutPlayerInVehicle(playerid, vehicleid, 0);
        SendClientMessage(playerid, COLOR_GREEN, "Car spawned at your location!");
    }

    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)