Author Topic: !fight problem  (Read 3245 times)

0 Members and 2 Guests are viewing this topic.

Offline johnx

  • Street Thug
  • *
  • Posts: 25
    • View Profile
!fight problem
« 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;
   }

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: !fight problem
« Reply #1 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

Offline Madara

  • Street Thug
  • *
  • Posts: 48
    • View Profile
Re: !fight problem
« Reply #2 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
« Last Edit: December 13, 2010, 11:11:33 am by Madara »

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: !fight problem
« Reply #3 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

Offline Madara

  • Street Thug
  • *
  • Posts: 48
    • View Profile
Re: !fight problem
« Reply #4 on: December 14, 2010, 10:47:16 am »
Well, that and would like a "! lms"  :-\