help: multiple results for vehicle found
#1

hello,

my question is... how to make a multiple results for vehicle found ?

example when i type /v <vehicle name>

example /v mave

and send the messages

multiple results for mave were found (2 matches)

Maverick (Model ID:487)

Police-Maverick (Model ID:497)

ecc... for all vehicles
Reply
#2

pawn Код:
new Model[MAX_MATCHES],cnt;

for(new d; d < sizeof(VehicleNames); d++)
    if(strfind(VehicleNames[d],cmdtext,true) != -1)
    {
        Model[cnt++] = (d + 400);
    }
   
if(cnt == 0) // No results
else{

    // multiple results for mave were found (%d matches),cnt

    for(new v; v < cnt; v++)
    {
        // Maverick (Model ID:487) // VehicleNames[Model[v]-400],Model[v]

        // Police-Maverick (Model ID:497) // VehicleNames[Model[v]-400],Model[v]
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)