What to use to compare to multiple posibilities?
#1

So, I have this around the top of my GM
pawn Код:
new LSPDvehicles[] =
{
    596, 597, 598, 599, 601, 497, 528, 490
};
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    //get vehicle id
    new vid;
    vid = GetVehicleModel(vehicleid);
    //check for factions
    if(vehicleid == LSPDvehicles[vid]){
        SendClientMessage(playerid, -1, "police car");
    }
   
    return 1;
}
So, when I enter any vehicle with the model ids listed in the LSPDvehicles, it should simply give me "hello world" message saying "police car" a test. However, it doesn't send me the message. Why is it not detecting that I am getting into a police car?
Reply


Messages In This Thread
What to use to compare to multiple posibilities? - by Nathan_Taylor - 13.03.2013, 15:29
Re: What to use to compare to multiple posibilities? - by Patrick - 13.03.2013, 15:33
Re: What to use to compare to multiple posibilities? - by Denying - 13.03.2013, 15:34
Re: What to use to compare to multiple posibilities? - by Patrick - 13.03.2013, 15:37
Re: What to use to compare to multiple posibilities? - by Nathan_Taylor - 13.03.2013, 15:37
Re: What to use to compare to multiple posibilities? - by Denying - 13.03.2013, 15:41
Re: What to use to compare to multiple posibilities? - by RajatPawar - 13.03.2013, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)