Weapon array
#2

Quote:
Originally Posted by SaYrOn
Посмотреть сообщение
Create weapon array, under command add string variable( weapon[20], for example), and then do a loop something like:

Код:
for(new i; i < sizeof(sWeapons); i++)
{
       if(strcmp(sWeapons[i], weapon) == 0)
       {
                   // Do smth if weapon that player entered is same with some weapon from the array
       }
}
Will try it thanks RPed.
Quote:
Originally Posted by ******
Посмотреть сообщение
I would say look up the "k" specifier to write a custom sscanf specifier.
Didn't know i can write a custom specifier :O
Thanks i'll take a look about sscanf topic.
Reply


Messages In This Thread
Weapon array - by CoDeZ - 03.10.2012, 09:31
Re: Weapon array - by CoDeZ - 03.10.2012, 21:30

Forum Jump:


Users browsing this thread: 1 Guest(s)