Author Topic: Can anyone help on This?  (Read 2753 times)

0 Members and 2 Guests are viewing this topic.

Offline faizan12345

  • Street Thug
  • *
  • Posts: 22
  • VV Developer
    • View Profile
Can anyone help on This?
« on: February 08, 2012, 03:30:40 pm »
I want Multi wep commands for My Pawno Script....
can any one know about multi weapons commands...
Please tell me.....

Offline RasikhQadeer

  • Street Thug
  • *
  • Posts: 49
  • Hero_Great! The Great Scripter!
    • View Profile
Re: Can anyone help on This?
« Reply #1 on: February 08, 2012, 05:05:00 pm »
So how many weps you want i have my wep system for example the number you put with !wep[number here] [and weps here] those number of weps you get if you want them then send me a pm ;) right now i give you 1 with 5 weps!

[pawn]}
   else if ( strcmp( cmd, "!wep5", true ) == 0 )
   {
       new tmp2[ 256 ], tmp3[ 256 ], tmp4[ 256 ], tmp5[ 256 ];
         tmp = strtok( cmdtext, idx ), tmp2 = strtok( cmdtext, idx ), tmp3 = strtok( cmdtext, idx ), tmp4 = strtok( cmdtext, idx ), tmp5 = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
       else if ( !strlen( tmp5 ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !wep [weapon1]]" );
      else
      {
          new wep, wep2, wep3, wep4, wep5;
          wep = FindWepIDFromString( tmp );
          SetPlayerWeapon(playerid, wep, 99999);
            wep2 = FindWepIDFromString( tmp2 );
         SetPlayerWeapon(playerid, wep2, 99999);
         wep3 = FindWepIDFromString( tmp3 );
         SetPlayerWeapon(playerid, wep3, 99999);
         wep4 = FindWepIDFromString( tmp4 );
         SetPlayerWeapon(playerid, wep4, 99999);
         wep5 = FindWepIDFromString( tmp5 );
         SetPlayerWeapon(playerid, wep5, 99999);
         if(wep == 33)
         {
         SetPlayerWeapon(playerid,0,0);
         SendClientMessage(playerid,RED,"Error: THAT WEAPON NOT ALLOUD");
         }
         
      }
      return 1;[/pawn]

Note: in vcmp pawn dont have this function so you can only use this cmd for 5 weps only other wise it wont work you have to use this syntax !wep5 (<== change to what cmd text you want!) [wep1] [wep]2 [wep2] [wep4] [wep5] then you will get all the 5 weps

Good Luck!


Offline heekz.shadow

  • LU testers
  • Made Man
  • *
  • Posts: 249
    • View Profile
Re: Can anyone help on This?
« Reply #2 on: February 08, 2012, 06:07:51 pm »
"Error: THAT WEAPON NOT ALLOUD"

1. ^ Not to be an arse but.. Let's be serious...

" Hero_Great the great scripter ? "

2. It's not about what you think about yourself, it's what about others think about of you. I've been like that, but I corrected myself..

3. Hello bro, your command is not even good. Not everyone uses GUPS ( Like you lol ). GUPS is for studying ( this is how I get it )...

You missed one bracket and added another one. FAILBRO. Let me correct this for public, Hero_Great, the one who stole my scripts and used them into PRO GM, you know, the one you gave to OkieDokie. And you boasted with it, and claimed it to be yours. The fuck you did ? Stolen everyone's scripts, mixed up and said it was yours. SHAME ON YOU

[pawn]}
   else if ( strcmp( cmd, "!wep", true ) == 0 )
   {
       new tmp2[ 256 ], tmp3[ 256 ], tmp4[ 256 ], tmp5[ 256 ];
         tmp = strtok( cmdtext, idx ), tmp2 = strtok( cmdtext, idx ), tmp3 = strtok( cmdtext, idx ), tmp4 = strtok( cmdtext, idx ), tmp5 = strtok( cmdtext, idx );
//      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
       if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !wep wep1 wep2 wep3 wep4 wep5" );
      else
      {
                new wep[6];
                if( !strlen( tmp2 ) )
                {
                wep[1] = FindWepIDFromString( tmp );
                SetPlayerWeapon(playerid, wep[1], 9999 );
                }
                else if( !strlen( tmp3 ) )
                {
                wep[1] = FindWepIDFromString( tmp );
                SetPlayerWeapon(playerid, wep[1], 9999 );
                wep[2] = FindWepIDFromString( tmp2 );
                SetPlayerWeapon(playerid, wep[2], 9999 );
                }
                else if( !strlen( tmp4 ) )
                {
                wep[1] = FindWepIDFromString( tmp );
                SetPlayerWeapon(playerid, wep[1], 9999 );
                wep[2] = FindWepIDFromString( tmp2 );
                SetPlayerWeapon(playerid, wep[2], 9999 );
                wep[3] = FindWepIDFromString( tmp3 );
                SetPlayerWeapon(playerid, wep[3], 9999 );
                }
                else if( !strlen( tmp5 ) )
                {
                wep[1] = FindWepIDFromString( tmp );
                SetPlayerWeapon(playerid, wep[1], 9999 );
                wep[2] = FindWepIDFromString( tmp2 );
                SetPlayerWeapon(playerid, wep[2], 9999 );
                wep[3] = FindWepIDFromString( tmp3 );
                SetPlayerWeapon(playerid, wep[3], 9999 );
                wep[4] = FindWepIDFromString( tmp4 );
                SetPlayerWeapon(playerid, wep[4], 9999 );
                }
                else if( strlen( tmp5 ) )
                {
                wep[1] = FindWepIDFromString( tmp );
                SetPlayerWeapon(playerid, wep[1], 9999 );
                wep[2] = FindWepIDFromString( tmp2 );
                SetPlayerWeapon(playerid, wep[2], 9999 );
                wep[3] = FindWepIDFromString( tmp3 );
                SetPlayerWeapon(playerid, wep[3], 9999 );
                wep[4] = FindWepIDFromString( tmp4 );
                SetPlayerWeapon(playerid, wep[4], 9999 );
                wep[5] = FindWepIDFromString( tmp5 );
                SetPlayerWeapon(playerid, wep[5], 9999 );
                }
               
         if(( wep[1] == 33) || ( wep[2] == 33) || ( wep[3] == 33) || ( wep[4] == 33) || ( wep[5] == 33 ))
         {
                        SetPlayerWeapon(playerid,0,0);
         SendClientMessage(playerid,RED,"Error: Miniguns are not allowed for user use.");
         }
         
      }
      return 1;
}[/pawn]

^ Will help reducing the ammount of memory at every command, so instead of using !wep1 and !wep 2 and so on, you can use this. But what's worth my publishing? You will take it and publish it as your own. So...

NOT TESTED, TEST AT YOUR OWN RISK
« Last Edit: February 08, 2012, 06:16:59 pm by heekz.shadow »
Code: [Select]
[20:23] <habi> later only i heard that lu chatbox is customizable. On my first visit, it appeared ugly.
[20:23] <habi> May be that also be the reason why lu has no players

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Can anyone help on This?
« Reply #3 on: February 08, 2012, 06:09:56 pm »
Before I even get started, you, RasikhQadeer, don't question and just listen!!
So how many weps you want i have my wep system for example the number you put with !wep[number here] [and weps here] those number of weps you get if you want them then send me a pm ;) right now i give you 1 with 5 weps!

[pawn]}
   else if ( strcmp( cmd, "!wep5", true ) == 0 )
   {
       new tmp2[ 256 ], tmp3[ 256 ], tmp4[ 256 ], tmp5[ 256 ];
         tmp = strtok( cmdtext, idx ), tmp2 = strtok( cmdtext, idx ), tmp3 = strtok( cmdtext, idx ), tmp4 = strtok( cmdtext, idx ), tmp5 = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
       else if ( !strlen( tmp5 ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !wep [weapon1]]" );
      else
      {
          new wep, wep2, wep3, wep4, wep5;
          wep = FindWepIDFromString( tmp );
          SetPlayerWeapon(playerid, wep, 99999);
            wep2 = FindWepIDFromString( tmp2 );
         SetPlayerWeapon(playerid, wep2, 99999);
         wep3 = FindWepIDFromString( tmp3 );
         SetPlayerWeapon(playerid, wep3, 99999);
         wep4 = FindWepIDFromString( tmp4 );
         SetPlayerWeapon(playerid, wep4, 99999);
         wep5 = FindWepIDFromString( tmp5 );
         SetPlayerWeapon(playerid, wep5, 99999);
         if(wep == 33)
         {
         SetPlayerWeapon(playerid,0,0);
         SendClientMessage(playerid,RED,"Error: THAT WEAPON NOT ALLOUD");
         }
         
      }
      return 1;[/pawn]

Note: in vcmp pawn dont have this function so you can only use this cmd for 5 weps only other wise it wont work you have to use this syntax !wep5 (<== change to what cmd text you want!) [wep1] [wep]2 [wep2] [wep4] [wep5] then you will get all the 5 weps

Good Luck!



First, this is Gups!!! You don't give Gups as a complete example.... The name says it all, "General USED Pawn Script"

Second, first thing that comes to mind is the number of tokens. Your lucky I searched for you this..
[pawn]stock NumTok(data[], sep)
{
   new i,ln = 1,b;
      new txt[256]; format(txt,256,"%s",data);
   for(; i <= strlen(txt); i++)
   {
      if (txt == sep) { ln++; b = i+1; }
   }
      strmid(txt,txt,b,strlen(txt));
   if (!strlen(txt)) ln--;
   return ln;
}[/pawn]
Source:Madara's GeoIP

You don't really need to download the Include, just add this script to your script. I'll let you figure out what to do next. Good Luck!!



Shadow replied when I was replying so, the code is mostly like what shadow told you..

2. It's not about what you think about yourself, it's what about others think about of you. I've been like that, but I corrected myself..
Agreed
3. Hello bro, your command is not even good. Not everyone uses GUPS ( Like you lol ). GUPS is for studying ( this is how I get it )...
That's where I learned enum from.. And a whole bunch of other scripts and stuff.
« Last Edit: February 08, 2012, 06:13:53 pm by Fuzzy168 »
I'm beginning to feel like a Lag God, Lag God

Offline faizan12345

  • Street Thug
  • *
  • Posts: 22
  • VV Developer
    • View Profile
Re: Can anyone help on This?
« Reply #4 on: February 09, 2012, 07:31:28 am »
Thanks All My friends To Give such a Great Help...
Lot of Thanks For Shadow....
I use all of ur commands to use multi weapons...
Thanks Alot.... :)