/veh help.
#8

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

    if(playerVariables[playerid][pAdminLevel] >= 3) {

        SendClientMessage(playerid, COLOR_TEAL, "--------------------------------------------------------------------------------------------------------------------------------");
        SendClientMessage(playerid, COLOR_WHITE, "Vehicle Search:");

        new
            rcount,
            string[128];

        if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "No keyword specified.");
        if(strlen(params) < 3) return SendClientMessage(playerid, COLOR_GREY, "Search keyword too short.");

        for(new v; v < sizeof(VehicleNames); v++) {
            if(strfind(VehicleNames[v], params, true) != -1) {

                if(rcount == 0) format(string, sizeof(string), "%s (ID %d)", VehicleNames[v], v+400);
                else format(string, sizeof(string), "%s | %s (ID %d)", string, VehicleNames[v], v+400);

                rcount++;
            }
        }

        if(rcount == 0) SendClientMessage(playerid, COLOR_GREY, "No results found.");

        else if(strlen(string) >= 128) SendClientMessage(playerid, COLOR_GREY, "Too many results found.");

        else SendClientMessage(playerid, COLOR_WHITE, string);

        SendClientMessage(playerid, COLOR_TEAL, "--------------------------------------------------------------------------------------------------------------------------------");
    }
    return 1;
}
Show me the errors you get without ANY Changes made. Also, What script are you using?
Reply


Messages In This Thread
/veh help. - by nogh445 - 14.01.2012, 21:30
Re: /veh help. - by BleverCastard - 14.01.2012, 21:32
Re: /veh help. - by BleverCastard - 14.01.2012, 21:34
Re: /veh help. - by BleverCastard - 14.01.2012, 21:42
Re: /veh help. - by nogh445 - 14.01.2012, 21:46
Re: /veh help. - by BleverCastard - 14.01.2012, 21:46
Re: /veh help. - by nogh445 - 14.01.2012, 21:49
Re: /veh help. - by BleverCastard - 14.01.2012, 21:53
Re: /veh help. - by nogh445 - 14.01.2012, 21:58
Re: /veh help. - by BleverCastard - 14.01.2012, 21:59

Forum Jump:


Users browsing this thread: 2 Guest(s)