• Welcome to Vice City Multiplayer.
 

!fight problem

Started by johnx, December 03, 2010, 09:20:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

johnx

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;
   }

Terminatorupgrade 2

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

Madara

#2
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.

   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

Scripter

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

Madara

Well, that and would like a "! lms"  :-\