SA-MP Forums Archive
Tazing with the SD pistol. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Tazing with the SD pistol. (/showthread.php?tid=149617)



Tazing with the SD pistol. - NiiRV4N4 - 22.05.2010

pawn Code:
if(((oldkeys & KEY_FIRE) && !(newkeys & KEY_FIRE)) || ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)) || (newkeys & KEY_FIRE))
    {
      for(new i = 0; i < GetMaxPlayers(); i++)
        {
          if(IsPlayerConnected(i) && playerid != i && !IsPlayerNPC(i))
          {
                if(IsPlayerAiming(playerid, i))
                {
                    if(PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1 || PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 2)
                    {
                      if(GetPlayerWeapon(playerid) == 23)
                      {
                        if(IsPlayerInAnyVehicle(i) || IsPlayerInAnyVehicle(i))
                        {
                            return 0;
                        }
                        //SetPlayerHealth(i, 0);
                        TogglePlayerControllable(i, 0);
                            ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
                            GameTextForPlayer(i, "(Tazed)", 3000, 3);
                            GameTextForPlayer(playerid, "(Tazed) Complete", 3000, 3);
                            //SetTimerEx("UnTaze", 9000, 0, "d",i);
                            return 1;
                        }
                    }
                }
            }
        }
How come this doesn't work on my script? Credits goto Eric_.

It gives me 26 errors that are irrelevant to this code. I checked for missing brackets, etc.


Re: Tazing with the SD pistol. - W00Z - 22.05.2010

You could forget about a buckle


Re: Tazing with the SD pistol. - NiiRV4N4 - 22.05.2010

Quote:
Originally Posted by W00Z
You could forget about a buckle
I already checked for missing brackets.


Re: Tazing with the SD pistol. - Assyria - 22.05.2010

Are you use? I see 7 opening brackets but only 6 closing brackets.


Re: Tazing with the SD pistol. - Hiddos - 22.05.2010

http://pastebin.com/wJ7AMakN

Missing a closing bracket.


Re: Tazing with the SD pistol. - NiiRV4N4 - 22.05.2010

* sigh * how did I not see that? thanks guys.