Jump to content
  • 0

Set Skin


Kristu23

Question

3 answers to this question

Recommended Posts

cred k asta vrei sa poata toti plaiery sa isi schimbe skinu din comanda

	if(strcmp(cmd, "/setskin", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setskin [playerid/PartOfName] [skin model]");
				return 1;
			}
			new playa;
			new health;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			health = strval(tmp);
			if(health > 299 || health < 0) { SendClientMessage(playerid, COLOR_GREY, " Dont go below number 0, or above number 299 !"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 0)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
				        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "* Your normal skin has been changed by Admin %s in skin id %d", sendername, health);
						SendClientMessage(playa, COLOR_WHITE, string);
						format(string, sizeof(string), "* You have given %s skin id %d.", giveplayer, health);
						SendClientMessage(playerid, COLOR_WHITE, string);
						PlayerInfo[playa][pModel] = health;
						PlayerInfo[playa][pChar] = health;
						SetPlayerSkin(playa, PlayerInfo[playa][pChar]);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_WHITE, " Nu ai autorizatie pentru a folosi aceasta comanda !");
			}
		}
		return 1;
	}

e copiata din gm meu si facuta pt plaiery nu numai pt admin

Link to comment
Share on other sites

if(strcmp(cmd, "/changeskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /changeskin [skin id]");
return 1;
}
new health;
health = strval(tmp);
if(health > 299 || health < 0) { SendClientMessage(playerid, COLOR_GREY, " Dont go below number 0, or above number 299 !"); return 1; }
format(string, sizeof(string), "* You have given skin id %d.", health);
SendClientMessage(playerid, COLOR_WHITE, string);
SetPlayerSkin(playerid,  health);
}
}
}
return 1;
}

i0418xcttya707ofg.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.