01.06.2014, 03:59
i want a /Veh cmd with the veh model images in it .....
Ty
Ty
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;
}