Help||How to make /setskin on my mod
#1

i took urban roleplay, theres no /setskin, and /forceskin bugged.
Can somebody guide me how to make /setskin on my mod? thanks.
Reply
#2

http://forum.sa-mp.com/index.php?action=search
Reply
#3

Where to put the command? i mean like objects you put in OnGame'Somethings' where i need to put the /setskin.
Thanks~
Reply
#4

OnPlayerCommandText-callback.
Reply
#5

I want it to be on the admin mod.
So only admins can to /setskin.
Can you send me the command with the line of ----------------[SETSKIN]------------ and the code i need put in so only admins can /setSkin ?
Reply
#6

There is beautiful script (look in search rcon admin, ladmin etc... ) I supose all adminscripts has this cmd ONY for admins, rcon admins..

Reply
#7

I think that's what you want:
COMMAND
Код:
if(!strcmp(cmd, "/setskin", true))
	{
		StrVar = strtok(cmdtext, idx);
		if (!strlen(StrVar)){
    return 1;
		}
		if ((strval(StrVar) < 0) || (strval(StrVar) > 299) || IsInvalidSkin(strval(StrVar))) 
return SendClientMessage(playerid, COLOR_RED, "Invalid Skin");
		SetPlayerSkin(playerid, strval(StrVar));
		return 1;
	}
Stock
Код:
stock IsInvalidSkin(skinid){
new InSkin[] = {0, 3, 4, 5, 6, 8, 42, 65, 86,74, 119, 149, 208, 273, 289};
for (new i=0; i<sizeof(InSkin); i++) if(skinid == InSkin[i]) return 1;
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)