Extremely agravating. Need help
#1

Ok, well.. I scripted /kick /ban /freeze and /thaw, but whenever i do it on ID 0, it doesn't work. Here's my thaw code:

pawn Код:
if(strcmp(cmd, "/thaw", true) == 0 || strcmp(cmd, "/unfreeze", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ALERT, "** Error: /freeze [id/name]");
            if(PlayerInfo[playerid][Admin] >= 2)
            {
                new player = ReturnUser(tmp);
                if(IsPlayerConnected(player))
                {
                  if(player != INVALID_PLAYER_ID)
                  {
                        TogglePlayerControllable(player,1);
                        new giveplayer[MAX_PLAYER_NAME], getplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid,giveplayer,sizeof(giveplayer));
                        GetPlayerName(player,getplayer,sizeof(getplayer));
                        format(tmp, sizeof(tmp), "Admin: %s was unfrozen by %s.",getplayer,giveplayer);
                        SendClientMessageToAll(COLOR_ADMIN, tmp);
                        new year,month,day;
                        getdate(year,month,day);
                        format(tmp, sizeof(tmp), "Admin: %s was unfrozen by %s. [%d/%d/%d]",getplayer,giveplayer,day,month,year);
                        return 1;
                    }
                }
                else
                {
                  SendClientMessage(playerid, COLOR_ALERT, "** That player is not connected.");
                  return 1;
                }
            }
      }
      return 1;
Some help would be extremely appreciated
Reply
#2

Does it send one of the error messages or does it do completely nothing ?
Reply
#3

Problem resolved, changed to dcmd and sscanf.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)