SA-MP Forums Tips & Tricks
 New Account Members List Search Today's Posts Mark Forums Read

 26/01/2011, 06:52 PM #21 ipsBruno Godfather     Join Date: Apr 2010 Location: Brazil, Caxias RS Posts: 6,088 Reputation: 545 Respuesta: Tips & Tricks pawn Code: `public OnFilterScriptInit(){    new zL[] = "²£¢¬¢¢*abcdefghijklmnopqrstuvxzwy ",s[12],zValue = - 1;    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x69) ? (s[0] = zL[i]) : (s[0] = '0');      if(zL[i] == 0x69) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x20) ? (s[1] = zL[i]) : (s[1] = '0');      if(zL[i] == 0x20) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x6C) ? (s[2] = zL[i]) : (s[2] = '0');      if(zL[i] == 0x6C) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x6F) ? (s[3] = zL[i]) : (s[3] = '0');      if(zL[i] == 0x6F) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x76) ? (s[4] = zL[i]) : (s[4] = '0');      if(zL[i] == 0x76) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x65) ? (s[5] = zL[i]) : (s[5] = '0');      if(zL[i] == 0x65) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x20) ? (s[6] = zL[i]) : (s[6] = '0');      if(zL[i] == 0x20) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x61) ? (s[7] = zL[i]) : (s[7] = '0');      if(zL[i] == 0x61) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x6C) ? (s[8] = zL[i]) : (s[8] = '0');      if(zL[i] == 0x6C) break; }    for(new i; zL[i]; ++i) { zValue = (zL[i]  == 0x6C) ? (s[9] = zL[i]) : (s[9] = '0');      if(zL[i] == 0x6C) break; }    printf(s,zValue);    return true;}` I Love all '-'-'-' My code is nb __________________ Baixar Músicas Grátis
 27/01/2011, 01:20 AM #22 Lorenc_ High-roller     Join Date: Jan 2010 Location: Australia Posts: 3,801 Reputation: 1160 Re: Tips & Tricks Thanks for posting, needed some info on the "[MAX_PLAYERS char]" thing __________________ Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777
 27/01/2011, 07:28 AM #23 [03]Garsino Guest   Posts: n/a Re: Tips & Tricks Any way to do the "Char-arrays" trick using 2D arrays? pawn Code: `new MuteTime[MAX_PLAYERS][2];`
 27/01/2011, 10:44 AM #24 Slice High-roller   Join Date: Mar 2008 Location: Sweden Posts: 1,836 Reputation: 1607 Re: Tips & Tricks @[03]Garsino: pawn Code: `new MuteTime[MAX_PLAYERS][2 char];MuteTime[playerid]{0} = 1;MuteTime[playerid]{1} = 1;` @******: Interesting post, now I finally know how the stringize operator thinks! I did point out that you have to enclose strings in parentheses, actually. I'll squeeze in the part about the TD update functionality.
 27/01/2011, 11:32 AM #25 Zh3r0 High-roller   Join Date: Mar 2008 Posts: 4,508 Reputation: 398 Re: Tips & Tricks Wow just gota say millions of thanks, just learned more about the ternary operators, and mostly everything u wrote is useful. good job Slice, once again, good job. I had such a nice scripting time http://pastebin.com/DcUpcqVD __________________ Last edited by Zh3r0; 27/01/2011 at 12:29 PM.
 28/01/2011, 12:49 PM #26 CyNiC High-roller   Join Date: Jan 2009 Location: Brazil Posts: 1,419 Reputation: 203 Re: Tips & Tricks Very good, Slice, I have no formation in any programming language, these things are not easy to find around, thanks. __________________ My scripts Brazucas'Server
 28/01/2011, 06:13 PM #27 ricardo178 High-roller     Join Date: Dec 2010 Posts: 1,598 Reputation: 91 Re: Tips & Tricks Hum... if this is a TUT why haven't explain words? __________________ Fresh-Roleplay.com Code: ```My Works: [TUT]Clean ZCMD Command(UseFull) [TUT]Tutorial Kick System [FS]Shot Crack System```
 31/01/2011, 09:34 PM #28 MrDeath537 High-roller   Join Date: Nov 2009 Location: Argentina Posts: 1,959 Reputation: 29 Re: Tips & Tricks Nice tutorial, most of those things I already knew, but: - I didn't know how to use ternary operator (LOL) - How to convert integer to boolean using "!!" - The usage of brackets in char arrays. Thanks for tutorial! __________________ Sometimes I return.
 01/02/2011, 02:59 AM #29 ipsBruno Godfather     Join Date: Apr 2010 Location: Brazil, Caxias RS Posts: 6,088 Reputation: 545 Respuesta: Tips & Tricks Slice, put in Tutorial ~= ^= |= _: Hugs __________________ Baixar Músicas Grátis
 01/02/2011, 07:47 AM #30 Slice High-roller   Join Date: Mar 2008 Location: Sweden Posts: 1,836 Reputation: 1607 Re: Tips & Tricks DraKiNs, here's a tutorial explaining the first 3 operators: An in-depth look at binary and binary operators. The _: operator removes tags from variables/values. Last edited by Slice; 05/02/2011 at 08:01 AM.

 Thread Tools Display Modes Linear Mode

 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 Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post KomplettMaster General 12 26/12/2012 04:04 PM Infinity Tutorials 6 29/04/2012 11:34 PM

All times are GMT. The time now is 06:41 PM.

 -- (EN) English -- (RU) Русски Contact Us - SA-MP - Archive - Top