SA-MP Forums Archive
Can you help me with this? - 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: Can you help me with this? (/showthread.php?tid=251543)



Can you help me with this? - Cjgogo - 27.04.2011

I guess it's worng but I really wanna know how to script arrest command for MMB(Middle Mosue Button)and I don't know even if I staretd right:

pawn Код:
if(gTeam[playerid] == TEAM_COPS)
    {
       new ID;
       if(newkeys == KEY_LOOK_BEHIND)
       {
          GetPlayerWantedLevel(ID);
          if(GetPlayerWantedLevel(ID) > 0)
          {
             GetDistanceBetweenPlayers(playerid,ID);
             if(GetDistanceBetweenPlayers(playerid,ID) > 4)
             {
                SendClientMessage(playerid,RED,"Nobody is close enough");
             }
             else if(GetDistanceBetweenPlayers(playerid,ID) < 4)
             {
                 SetTimer("TreeSecondsTimer,3000,1);
                 GametextForPlayer(playerid,"
You'll cuff the person in 3 seconds",5000,4);
                 if(timer = 0)
                 {
                    TogglePlayerControllable(ID,0);
                    SendClientMessageToAll(BLUE,%"d has been cuffed by %s");
                 }
             }
          }
       }
    }



Re: Can you help me with this? - Gertin - 27.04.2011

You have mistake :
pawn Код:
if(gTeam[playerid] == TEAM_COPS)
    {
       new ID;
       if(newkeys == KEY_LOOK_BEHIND)
       {
          GetPlayerWantedLevel(ID);
          if(GetPlayerWantedLevel(ID) > 0)
          {
             GetDistanceBetweenPlayers(playerid,ID);
             if(GetDistanceBetweenPlayers(playerid,ID) > 4)
             {
                SendClientMessage(playerid,RED,"Nobody is close enough");
             }
             else if(GetDistanceBetweenPlayers(playerid,ID) < 4)
             {
                 SetTimer("TreeSecondsTimer",3000,1);
                 GametextForPlayer(playerid,"You'll cuff the person in 3 seconds",5000,4);
                 if(timer = 0)
                 {
                    TogglePlayerControllable(ID,0);
                    SendClientMessageToAll(BLUE,%"d has been cuffed by %s");
                 }
             }
          }
       }
    }