Help with skin checking
#1

how to check skin,like if skin lalala?is there any way to do it?
Reply
#2

GetPlayerSkin
Reply
#3

i mean like:
if (strcmp("/skin", cmdtext, true, 10) == 0)
{
if Playerskin 10
SendClientMessage(playerid,COLOR_GREEN,"Pink Hair lalala");
return 1;
}
Reply
#4

Its kinda difficult to do it because u need to put comments for every skin
Reply
#5

thanks anyway now i need help with that ----> http://forum.sa-mp.com/index.php?topic=134593.0 ,someone help
Reply
#6

oh thx but lil nubie question im newbie ehh how i can make like i wanna check someones other skin? like /skin [playerid]
and uhh how to make it only if player is near you,you can check? with proxdetector or smth?
Reply
#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
#8

it gives still error
but i did all what ya said
Quote:

C:\Documents and Settings\Ingrid\Desktop\MRP\filterscripts\skin.pwn (2 : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Ingrid\Desktop\MRP\filterscripts\skin.pwn (33) : warning 203: symbol is never used: "dcmd_getskin"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#9

post the lines that give the error
Reply
#10

dcmd(getskin,1,cmdtext);
thats the one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)