Raised This Month: $ Target: $400
 0% 

String Help?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-04-2008 , 05:38   Re: String Help?
Reply With Quote #8

Nah, you don't need to copy it into String[] that was just an e.g , in your case will be something like...

Code:
public bool:CheckAchievement(id,achievement)
{
 new Num, Array[ACHVS_NUM][ACHVS_NUM];
 
 new iAchievement[11]
 num_to_str(achievement, iAchievement, 10);
 
 while(containi(g_Achvs[id],".") != -1)
 {
  strtok(g_Achvs[id], Array[Num], sizeof(Array[]) - 1, g_Achvs[id], sizeof(g_Achvs[]) - 1, '.');
  Num++;
 }
 for(new i ; i < sizeof(Array) ; i++)
 {
  if(!Array[i][0])
   continue;
 
  if(containi(Array[i], iAchievement) != -1)
   return true;
 }
 return false;
}
EDIT:I hope that g_Achvs is a string... "g_Achvs[33][length]" :p
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 01-04-2008 at 05:42.
Alka is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode