SA-MP Forums Archive
Help||How to make /setskin on my mod - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help||How to make /setskin on my mod (/showthread.php?tid=109976)



Help||How to make /setskin on my mod - KfirRP - 23.11.2009

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


Re: Help||How to make /setskin on my mod - dice7 - 23.11.2009

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


Re: Help||How to make /setskin on my mod - KfirRP - 23.11.2009

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


Re: Help||How to make /setskin on my mod - Correlli - 23.11.2009

OnPlayerCommandText-callback.


Re: Help||How to make /setskin on my mod - KfirRP - 24.11.2009

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 ?


Re: Help||How to make /setskin on my mod - GaGlets(R) - 24.11.2009

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




Re: Help||How to make /setskin on my mod - CyNiC - 24.11.2009

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;
}