Speeding Coding up.
#2

pawn Код:
new bool: stringMatch, AntiAdminAbuseTp[][] =
{
    "ammu",
    "lspd",
    "etc",
    "final option"
};

for(new i = 0, sof = sizeof(AntiAdminAbuseTp); i < sof; i++)
{
    if(strcmp(params, AntiAdminAbuseTp[i], true) == 0)
    {
        stringMatch = true;
        break;
    }
}

if(stringMatch == true)
{
    // The params matched an item on the list
}
else
{
    // The params didn't match an item on the list
}
Reply


Messages In This Thread
Speeding Coding up. - by MZ5 - 27.07.2012, 01:08
Re: Speeding Coding up. - by SuperViper - 27.07.2012, 01:15
Re: Speeding Coding up. - by MZ5 - 27.07.2012, 01:18
Re: Speeding Coding up. - by SuperViper - 27.07.2012, 01:19

Forum Jump:


Users browsing this thread: 1 Guest(s)