Help with skin checking
#7

pawn Код:
//first define dcmd
#define  dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) &&(dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1


//the command
dcmd_getskin(playerid,params[])
{
        new tmp[256], idx;
      tmp = strtok(params,idx);
      if(!strlen(tmp))
      {
       SendClientMessage(playerid,THIAZ_RED,"Usage: '/getskin [playerid]'");
       return true;
      }
      new pid = strval(tmp);
      if(!IsPlayerConnected(pid))
      {
       SendClientMessage(playerid,THIAZ_RED,"This playerid doesn't exist.");
       return true;
      }
      tmp = strrest(params,idx);
      new pname[MAX_PLAYER_NAME], string[256];
      GetPlayerName(pid, pname, sizeof(pname));
      tmp = strrest(params, idx);
      new skin;
      skin = GetPlayerSkin(pid);
      format(string, sizeof(string), "%s skin is: %d", pname, skin);
      SendClientMessage(playerid,THIAZ_RED, string);
      return true;
}

//put this under onplayercmdtext
public OnPlayerCommandText(playerid, cmdtext[])
{
  dcmd(getskin,7,cmdtext);
  return 1;
}
i have just modified my ban command and i haven't tested it so say when it doesn't work.
Reply


Messages In This Thread
Help with skin checking - by WardenCS - 21.11.2009, 08:19
Re: Help with skin checking - by pierhs - 21.11.2009, 08:28
Re: Help with skin checking - by WardenCS - 21.11.2009, 08:36
Re: Help with skin checking - by pierhs - 21.11.2009, 08:46
Re: Help with skin checking - by WardenCS - 21.11.2009, 08:53
Re: Help with skin checking - by WardenCS - 21.11.2009, 10:58
Re: Help with skin checking - by thiaZ_ - 21.11.2009, 11:13
Re: Help with skin checking - by WardenCS - 21.11.2009, 11:18
Re: Help with skin checking - by thiaZ_ - 21.11.2009, 11:34
Re: Help with skin checking - by WardenCS - 21.11.2009, 11:38

Forum Jump:


Users browsing this thread: 6 Guest(s)