[Include] • Easy GPSN •: » GetPlayerSkinName «
#1

^ ^
I was bored so decided to play with some codes but later relaised about this idea , and i made it for myself .

But i am releasing it now :P
Just a Fun Include
GPSN ™

¤ GetPlayerSkinName ¤
Feature :-
  • Uses MultiDimensional Array.
  • Created With Simple Code.
  • Took time in getting names of Skin from https://sampwiki.blast.hk/wiki/Skins:All .
  • Renamed Normal Ped skins to Normal Ped(1) ,Normal Ped(2) ,.... and so on.

Usage:- GetPlayerSkinName(playerid)

Screen:
Notice: Skin ID 74 is Invalid Skin
Test Script:

Код HTML:
#include <a_samp>
#include <GPSN>
#include <zcmd>

CMD:skinname(playerid, params[])
{
	new string[128], pname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pname, sizeof(pname));
	format(string, sizeof(string), "Your Name:%s(%i) || Skin:%s", pname, playerid, GetPlayerSkinName(playerid));
	SendClientMessage(playerid,0xBBFFEEFF,string);
	return 1;
}

CMD:skin(playerid,params[])
{
	if(isnull(params)) return SendClientMessage(playerid,-1,"Syntax: /skin ID");
	new skin = strval(params);
	if(skin > 299 || skin < 0 || skin == 74) return SendClientMessage(playerid,-1,"Valid Skins are Only b/w 0-299 , Skin ID 74 is invalid");
	SetPlayerSkin(playerid, skin);
	TogglePlayerControllable(playerid, true);
	return 1;
}
Reply
#2

Aaooo nice Work
Reply
#3

Nice idea.
Reply
#4

O: thanks guys <3
Reply
#5

Not that useful in my view. Anyways nice attempt bro!
Reply
#6

nice !
Reply
#7

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Not that useful in my view. Anyways nice attempt bro!
Heheh

Quote:
Originally Posted by Niko_boy
Just a Fun Include
Already mentioned , just to play i made this include :/

And thx for appreciation
Reply
#8

Somewhat handy.
pawn Код:
PlayerSkinID -= 0;
Totally needed there.
Better:
pawn Код:
#define GetPlayerSkinName(%0) PlayerSkinName[GetPlayerSkin(%0)]
Reply
#9

@Wups thanks for correcting me
Reply
#10

I find it very useful, even if it's that easy to make. Anyway, good job, Niko_boy.
Reply
#11

Better:
pawn Код:
stock GetPlayerSkinName(playerid)
{
    new id = GetPlayerSkin(playerid);
    if(id < 0 || id > 299) return "";
    else return PlayerSkinName[id];
}
Reply
#12

Useful.
And GooD JoB.
Reply
#13

Nice. Noting that you used a multi-dimensional array is a bit strange though - what else could you have possibly used?
Reply
#14

I was about to post about that too MP2, but I scratched it.

is your amx size around 90kb? because using [][300] means each string is 300 long that means 300 x 300 = 90000. so change it to [300][] ?
Reply
#15

Kar does have a point, but i would have used [][]


Pretty nice work tho.
Reply
#16

Good
Reply
#17

Gooddddddddddddd idea man!
Reply
#18

This is a 6 month old thread...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)