SA-MP Forums Archive
Need /Skin [SkinID] Command - 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: Need /Skin [SkinID] Command (/showthread.php?tid=135853)



Need /Skin [SkinID] Command - Wasim_Cortez - 22.03.2010

Well, I use a GF Edit, And i was thinking that it would be better if i used a /Skin [SkinID] Command.
I don't know how to make it so i just need a little help.

Thanks.


Re: Need /Skin [SkinID] Command - MahmutBey - 22.03.2010

But, turkish..

Код:
//----------------------/setskin--------------
	if(strcmp(cmd, "/setskin", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KULLANIM: /setskin [oyuncuID] [skinID]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Yanlэю Skin ID!"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			  if(IsPlayerConnected(para1))
			  {
			    if(para1 != INVALID_PLAYER_ID)
			    {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pChar] = level;
						format(string, sizeof(string), "%s adlэ yцnetici tarafэndan skininiz deрiюtirildi.", sendername);
						SendClientMessage(para1, COLOR_WHITE, string);
						format(string, sizeof(string), "%s adlэ kiюinin skinini %d olarak deрiюtirdiniz.", giveplayer,level);
						SendClientMessage(playerid, COLOR_WHITE, string);
					  SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Bu komutu kullanmak iзin gerekli yetkiniz yok!");
			}
		}
		return 1;
	}



Re: Need /Skin [SkinID] Command - Wasim_Cortez - 22.03.2010

Quote:
Originally Posted by MahmutBey
But, turkish..

Код:
//----------------------/setskin--------------
	if(strcmp(cmd, "/setskin", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KULLANIM: /setskin [oyuncuID] [skinID]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Yanlэю Skin ID!"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			  if(IsPlayerConnected(para1))
			  {
			    if(para1 != INVALID_PLAYER_ID)
			    {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pChar] = level;
						format(string, sizeof(string), "%s adlэ yцnetici tarafэndan skininiz deрiюtirildi.", sendername);
						SendClientMessage(para1, COLOR_WHITE, string);
						format(string, sizeof(string), "%s adlэ kiюinin skinini %d olarak deрiюtirdiniz.", giveplayer,level);
						SendClientMessage(playerid, COLOR_WHITE, string);
					  SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Bu komutu kullanmak iзin gerekli yetkiniz yok!");
			}
		}
		return 1;
	}
Thanks, Is this for anyone? Or just admins? And don't worry my mums turk she would help me.


Re: Need /Skin [SkinID] Command - MahmutBey - 22.03.2010

Only admins use to this code..


Re: Need /Skin [SkinID] Command - Wasim_Cortez - 22.03.2010

Quote:
Originally Posted by MahmutBey
Only admins use to this code..
I need the one i can put at Binco so they can change there own skin. Do you have a code of that? Would be helpful if not... Thanks for the help anyways.