Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: johnx on December 03, 2010, 12:20:40 pm

Title: !fight problem
Post by: johnx on December 03, 2010, 12:20:40 pm
when i do !fight in my server then i get 3 guns stubby m4 m60 but i want only one gun in !fight it is stubby so how to do it here is it see and solve it


 else if (strcmp(cmd, "!fight", true) == 0)
   {
   tmp = strtok(cmdtext, idx);
      if (!strlen(tmp)) {
                SetPlayerPos(playerid, -1363.4431,1332.3104,83.8882,250.4980);
               SendClientMessage(playerid, COLOR_ORANGE, "Welcome to Fight Zone!");
            GivePlayerWeapon(playerid, 21, 100);
            new plname[24],enstr[256];
                GetPlayerName(playerid,plname,24);
                format(enstr,sizeof(enstr),"%s has join fight zone.",plname);
                SendClientMessageToAll(COLOR_ORANGE,enstr);
      }
      return 1;
   }
Title: Re: !fight problem
Post by: Terminatorupgrade 2 on December 03, 2010, 12:27:41 pm
TRY this



else if (strcmp(cmd, "!fight", true) == 0)
   {
   tmp = strtok(cmdtext, idx);
      if (!strlen(tmp)) {
                SetPlayerPos(playerid, -1363.4431,1332.3104,83.8882,250.4980);
               SendClientMessage(playerid, COLOR_ORANGE, "Welcome to Fight Zone!");
              ResetPlayerWeapons(playerid);
   GivePlayerWeapon(playerid, 21, 100);
   new plname[24],enstr[256];
                GetPlayerName(playerid,plname,24);
                format(enstr,sizeof(enstr),"%s has join fight zone.",plname);
                SendClientMessageToAll(COLOR_ORANGE,enstr);
      }
      return 1;
   }



 ;D
Title: Re: !fight problem
Post by: Madara on December 13, 2010, 11:09:46 am
That does not work, first in the "SetPlayerPos" not define the argument 6, which is where you should go inside the saved location (in this case, if the place is outside, inside would be 0) , and you should remove:

      tmp = strtok (cmdtext, idx);
      if (! strlen (tmp)) {
      }

Look, here I leave the command, if you have not yet fixed.

Code: [Select]
   else if (strcmp(cmd, "!fight", true) == 0){
          new plname[24],enstr[256];
          SetPlayerPos(playerid, -1363.4431,1332.3104,83.8882,250.4980,0);
          SendClientMessage(playerid, COLOR_ORANGE, "** pm >> Welcome to Fight Zone!");
          ResetPlayerWeapons(playerid);
          GivePlayerWeapon(playerid, 21, 100);
          GetPlayerName(playerid,plname,24);
          format(enstr,sizeof(enstr),">> %s has join fight zone.",plname);
          SendClientMessageToAll(COLOR_ORANGE,enstr);
       return 1;
   }

Greetings ;D
Title: Re: !fight problem
Post by: Scripter on December 14, 2010, 09:49:55 am
can u tell me how to add cash when some one wins !fight and are there is any system that when player die in !fight and he rejoin again auto
Title: Re: !fight problem
Post by: Madara on December 14, 2010, 10:47:16 am
Well, that and would like a "! lms"  :-\