21.11.2009, 08:19
how to check skin,like if skin lalala?is there any way to do it?
//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;
}
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. |