/veh menu with the veh model
#3

Well try my Code:
pawn Код:
CMD:vehname(playerid, params[])
{

    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
        {
            SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
            return 1;
        }

        SendClientMessage(playerid, COLOR_NEWS,"___________________________________________________________________________________________________");
        SendClientMessage(playerid, COLOR_WHITE, "Vehicle Search:");

        new
            string[128];

        if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "No keyword specified.");
        if(!params[2]) return SendClientMessage(playerid, COLOR_GREY, "Search keyword too short.");

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

                if(isnull(string)) format(string, sizeof(string), "%s (ID %d)", VehicleName[v], v+400);
                else format(string, sizeof(string), "%s | %s (ID %d)", string, VehicleName[v], v+400);
            }
        }

        if(!string[0]) SendClientMessage(playerid, COLOR_GREY, "No results found.");
        else if(string[127]) SendClientMessage(playerid, COLOR_GREY, "Too many results found.");
        else SendClientMessage(playerid, COLOR_WHITE, string);

        SendClientMessage(playerid, COLOR_NEWS,"___________________________________________________________________________________________________");
    }
    return 1;
}
__________________________________________________ ____________________________________
Social Gaming Roleplay
37.59.28.180:13030
Unique Scripts
Refunding and Hiring



SG Production
Reply


Messages In This Thread
/veh menu with the veh model - by Naresh - 01.06.2014, 03:59
Re: /veh menu with the veh model - by RajatPawar - 01.06.2014, 04:02
Re: /veh menu with the veh model - by lwilson - 01.06.2014, 04:06
Re: /veh menu with the veh model - by Naresh - 01.06.2014, 04:23
Re: /veh menu with the veh model - by lwilson - 01.06.2014, 04:26
Re: /veh menu with the veh model - by Fire22 - 14.07.2014, 22:19

Forum Jump:


Users browsing this thread: 2 Guest(s)