Help with skin checking -
WardenCS - 21.11.2009
how to check skin,like if skin lalala?is there any way to do it?
Re: Help with skin checking -
pierhs - 21.11.2009
GetPlayerSkin
Re: Help with skin checking -
WardenCS - 21.11.2009
i mean like:
if (strcmp("/skin", cmdtext, true, 10) == 0)
{
if Playerskin 10
SendClientMessage(playerid,COLOR_GREEN,"Pink Hair lalala");
return 1;
}
Re: Help with skin checking -
pierhs - 21.11.2009
Its kinda difficult to do it because u need to put comments for every skin
Re: Help with skin checking -
WardenCS - 21.11.2009
thanks

anyway now i need help with that ---->
http://forum.sa-mp.com/index.php?topic=134593.0 ,someone help
Re: Help with skin checking -
WardenCS - 21.11.2009
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?
Re: Help with skin checking -
thiaZ_ - 21.11.2009
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.
Re: Help with skin checking -
WardenCS - 21.11.2009
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.
|
Re: Help with skin checking -
thiaZ_ - 21.11.2009
post the lines that give the error
Re: Help with skin checking -
WardenCS - 21.11.2009
dcmd(getskin,1,cmdtext);
thats the one