Drag + god
#1

Listen guys, someone can make me a /drag(drag+stop) and /god that only for admins,?
Reply
#2

You need to post this inside the scripting requests.

--- https://sampforum.blast.hk/showthread.php?tid=447813
Reply
#3

anyone?
no need /god
only /drag plz.
Reply
#4

something Link This?
pawn Код:
if(strcmp(cmd, "/drag", true) == 0)
  {
    if(IsPlayerConnected(playerid))
    {
     if(PlayerInfo[playerid][pAdmin] == 10 || IsACop(playerid))
     {
       tmp = strtok(cmdtext, idx);
      if(!strlen(tmp)) {
        SendClientMessage(playerid, COLOR_WHITE, "SERVER: /drag [Player ID]");
        return 1;
      }
      giveplayerid = ReturnUser(tmp);
       if(IsPlayerConnected(giveplayerid))
      {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
          if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
          {
            SendClientMessage(playerid, COLOR_GREY, "  You can't drag Cops !");
            return 1;
          }
          if(DragOff[giveplayerid] > 0)
          {
            SendClientMessage(playerid, COLOR_GREY, "  You Are already being Dragged!");
            return 1;
          }
         if (ProxDetectorS(3.0, playerid, giveplayerid))
         {
               if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You Cannot Drag Yourself!"); return 1; }
             GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "* You are being dragged by %s,", sendername);
            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
            format(string, sizeof(string), "* You begin to drag %s,", giveplayer);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            format(string, sizeof(string), "* %s has started to drag %s.", sendername ,giveplayer);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            TogglePlayerControllable(giveplayerid, 0);
            DragOff[giveplayerid] = playerid;

         }
         else
         {
           SendClientMessage(playerid, COLOR_GREY, "  That Player is not near you !");
           return 1;
         }
        }
      }
      else
      {
        SendClientMessage(playerid, COLOR_GREY, "  That player is Offline !");
        return 1;
      }
     }
     else
     {
      SendClientMessage(playerid, COLOR_GREY, "  You are not a Cop / FBI / Navy / National Guard!");
     }
   }
   return 1;
  }
  if(strcmp(cmd, "/stopdrag", true) == 0)
  {
    if(IsPlayerConnected(playerid))
    {
     if(PlayerInfo[playerid][pAdmin] == 10 || IsACop(playerid))
     {
       tmp = strtok(cmdtext, idx);
      if(!strlen(tmp)) {
        SendClientMessage(playerid, COLOR_WHITE, "SERVER: /stopdrag [Player ID]");
        return 1;
      }
      giveplayerid = ReturnUser(tmp);
      if(IsPlayerConnected(giveplayerid))
      {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
          if (ProxDetectorS(3.0, playerid, giveplayerid))
         {
           if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot stop dragging yourself!"); return 1; }
           if(DragOff[giveplayerid] > 0)
           {
             GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "* %s stopped dragging you.", sendername);
            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
            format(string, sizeof(string), "* You stopped dragging %s.", giveplayer);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            TogglePlayerControllable(giveplayerid, 1);
            DragOff[giveplayerid] = 0;
           }
           else
           {
             SendClientMessage(playerid, COLOR_GREY, "  That player isn't being dragged !");
             return 1;
           }
         }
         else
         {
           SendClientMessage(playerid, COLOR_GREY, "  That player is not near you !");
           return 1;
         }
        }
      }
      else
      {
        SendClientMessage(playerid, COLOR_GREY, "  That player is Offline !");
        return 1;
      }
     }
     else
     {
      SendClientMessage(playerid, COLOR_GREY, "  You are not a Cop / FBI / Navy / National Guard !");
     }
   }//not connected
   return 1;
  }
Reply
#5

it has those errors :O

Quote:

C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(827 : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(827 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(827 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(827 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(827 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(827 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(827 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8626) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8626) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8626) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8626) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8626) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8626) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8626) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8634) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8634) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8634) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8634) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8634) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8634) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8634) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8935) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8935) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8935) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8935) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8935) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8935) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8935) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8973) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8973) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8973) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8973) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8973) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8973) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(8973) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9089) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9089) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9089) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9089) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9089) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9089) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9089) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9350) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9350) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9350) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9350) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9350) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9350) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(9350) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10355) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10355) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10355) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10355) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10355) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10355) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10355) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10369) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10369) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10369) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10369) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10369) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10369) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10369) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10393) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10393) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10393) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10393) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10393) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10393) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10393) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10403) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10403) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10403) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10403) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10403) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10403) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10403) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10419) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10419) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10419) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10419) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10419) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10419) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10419) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10431) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10431) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10431) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10431) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10431) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10431) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10431) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1044 : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1044 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1044 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1044 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1044 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1044 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1044 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10462) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10462) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10462) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10462) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10462) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10462) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10462) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10945) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10945) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10945) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10945) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10945) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10945) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(10945) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(11757) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(11757) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(11757) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(11757) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(11757) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(11757) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(11757) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12404) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12406) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1240 : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12411) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12413) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12416) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1241 : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12420) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12423) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12425) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1242 : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12430) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12432) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12441) : error 021: symbol already defined: "TogglePlayerControllable"
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12444) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12445) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1244 : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12452) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12455) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(1245 : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12463) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12465) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12467) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12469) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12472) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\horizon\gamemodes\H RP_9.0.pwn(12474) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664 Copyright

Reply
#6

pawn Код:
if(strcmp(cmd, "/drag", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] == 10 || IsACop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                SendClientMessage(playerid, COLOR_WHITE, "SERVER: /drag [Player ID]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(IsACop(giveplayerid))
                    {
                        SendClientMessage(playerid, COLOR_GREY, "  You can't drag Cops !");
                        return 1;
                    }
            if(DragOff[playerid][giveplayerid] > 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "  You Are already being Dragged!");
                return 1;
            }
            if (ProxDetectorS(3.0, playerid, giveplayerid))
            {
                if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You Cannot Drag Yourself!"); return 1; }
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* You are being dragged by %s,", sendername);
                SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "* You begin to drag %s,", giveplayer);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "* %s has started to drag %s.", sendername ,giveplayer);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                TogglePlayerControllable(giveplayerid, 0);
                DragOff[giveplayerid] = playerid;

            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "  That Player is not near you !");
                return 1;
            }
        }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "  That player is Offline !");
            return 1;
        }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "  You are not a Cop / FBI / Navy / National Guard!");
        }
        }
        return 1;
    }
    if(strcmp(cmd, "/stopdrag", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] == 10 || IsACop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                SendClientMessage(playerid, COLOR_WHITE, "SERVER: /stopdrag [Player ID]");
                return 1;
            }
        giveplayerid = ReturnUser(tmp);
        if(IsPlayerConnected(giveplayerid))
        {
            if(giveplayerid != INVALID_PLAYER_ID)
            {
                if (ProxDetectorS(3.0, playerid, giveplayerid))
                {
                    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot stop dragging yourself!"); return 1; }
                    if(DragOff[giveplayerid] > 0)
                    {
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "* %s stopped dragging you.", sendername);
                        SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* You stopped dragging %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        TogglePlayerControllable(giveplayerid, 1);
                        DragOff[giveplayerid] = 0;
                    }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "  That player isn't being dragged !");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "  That player is not near you !");
                return 1;
            }
        }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "  That player is Offline !");
            return 1;
        }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "  You are not a Cop / FBI / Navy / National Guard !");
        }
        }//not connected
        return 1;
    }
it u do it like this it will work but u have to define DragOff
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)