Shockerz Skin Changer -
Shockey - 21.09.2010
This is a FS that includes everyskin, it uses a Input Dialog.

when you enter a number below 0 or above 299 it will tell you to pick a skin from 0 to 299
]cmd:
/ changeskin
]Link:
http://pastebin.com/T255Cmmt
Re: Shockerz Skin Changer -
Kitten - 21.09.2010
EDIT: NVM
Re: Shockerz Skin Changer - [L3th4l] - 21.09.2010
Pff, who rages for a simple script?
And btw, some skin ids can crash your server, add IsValidSkin function, search for it!
Re: Shockerz Skin Changer -
coconyr - 22.09.2010
simple, but looks better than / skins [id] ...
And is modern, but includes this function: for skins invalid (no cart)
try to include this:
Код:
IsInvalidSkin(skinid)
{
#define MAX_BAD_SKINS 22
new InSkin[MAX_BAD_SKINS] = {
0, 3, 4, 5, 6, 8, 42, 65, 74, 86,
119, 149, 208, 273, 289};
for (new i = 0; i < MAX_BAD_SKINS; i++) {
if (skinid == InSkin[i]) return true;}
return 0;
}
and here's a command that function including (without dialogue)
Код:
if (strcmp(cmd, "/skin", true) == 0 )
{
new skin[256];
skin = strtok(cmdtext, idx);
if (!strlen(skin))
{
SendClientMessage(playerid, COLOR_RED, "Use: /skin [skinid]");
return 1;
}
new newskin = strval(skin);
if ((newskin < 0) || (newskin > 299) || IsInvalidSkin(newskin)) {
SendClientMessage(playerid, COLOR_RED, "Server: This skin does not exist!");
return 1;
}
if (GetPlayerMoney(playerid) >= 0)
{
SetPlayerSkin(playerid, newskin);
GivePlayerMoney(playerid,-0);
format(string, 128, "Server: Skin changed to the id %d, have fun", newskin);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You can not change skin");
}
return 1;
}
bye
... sorry for my bad English ..
Re: Shockerz Skin Changer - [03]Garsino - 22.09.2010
It's a simple script but good work!
pawn Код:
IsInvalidSkin(skinid)
{
switch(skinid)
{
case 3..6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289: return 1;
default: return 0;
}
return 0;
}
Re: Shockerz Skin Changer -
Shockey - 22.09.2010
Ty all and I don't care how you say I should do it
Re: Shockerz Skin Changer - [03]Garsino - 22.09.2010
We only gave you an advice so people wont type in illegal skin IDs and make their game crash.
Re: Shockerz Skin Changer -
~Ricky~ - 22.09.2010
good job
i will use it
Re: Shockerz Skin Changer -
Dude_Lebowski - 06.04.2012
Excellent work
Re: Shockerz Skin Changer -
TarikLord55 - 20.10.2016
this script not working without AMX how create
Re: Shockerz Skin Changer -
Quinncell - 20.10.2016
Quote:
Originally Posted by TarikLord55
this script not working without AMX how create
|
If you figure out why I'll give you $50.