GetPlayerSkin
#1

how does that work? and where can i store the skin id? a normal string or something else?
Reply
#2

You will first declare a variable that will hold the skinid.
pawn Код:
new
        skinid = GetPlayerSkin(playerid);

Example of how it is used.

pawn Код:
if(strcmp("/myskin",cmdtext,true) == 0)
{
    new
        skinid = GetPlayerSkin(playerid);
        string[30];
   
    format(string,sizeof(string),"You are using Skin ID: %d",skinid)
    SendClientMessage(playerid,0xFFFFFFFF,string);
    return 1;
}
Reply
#3

but.. skinid is never assigned a value..
Reply
#4

Edited. My mistake. Look again.
Reply
#5

ooooo yeah right. thanks
Reply
#6

In Pawno, there are no such thing as "objects", a variable stores a value and that's as complex as it gets.

A string is actually just an array of ASCII codes, still just values in a variable.

There is one exception, there are 'tags' which tell the compiler how to treat the value, but other than that any value can be stored in either a standard value
pawn Код:
new value;
Or an array.
pawn Код:
new value[5];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)