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.
  • Similar Content

    • By Serban
      Salut, astazi 19/04/2021 am incercat sa fac un magazin in care sa-ti poti cumpara anumite bunuri dar cand vreau sa dau click pe una imi da mai multe selectate si eu doresc sa pot da click doar pe un singur text nu toate, stiti vreo functie inafara de TextdrawSize si PlayerTextdrawSize? va rog, am cautat si pe internet dar nu gasesc.
    • By GamerulKiller
      Am gamemode de la HPQ123 adica B-HOOD si cand dau /fpk imi da skin de cj ce sa fac?
    • By ShaggyShaggy
      Versiunea Mysql: R39-6 
      Deci problema e urmatoarea: cand dau in dialog valoarea pe care vreau sa o setez la nivelul unui player, nu ii actualizeaza acelui player nimic.
      Observatie: PlayerInfo pentru player-ul acela se schimba la valoarea pusa, dar nu se actualizeaza in baza de date.
       
      // Am un dialog unde ii setezi nivelul unui player if(response) { if(!IsNumeric(inputtext)) return SCM(playerid, verde_inchis, "Ai introdus si alte caractere!"); new player; player = GetPVarInt(playerid, "PlayerID"); PlayerInfo[player][pNivel] = strval(inputtext); } // Si aici o functie care actualizeaza perfect la playerid dar la player-ul din set nu function UpdatePlayerInfo(playerid) { gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `users` SET `Nivel` = %d WHERE `ID` = '%d'", PlayerInfo[playerid][pNivel], PlayerInfo[playerid][pSQLID]); mysql_tquery(SQL, gQuery, "", "", playerid); return 1; }  
    • By TheSlim2
      SALUTARE ma puteti ajuta si pe mine cum sa bag comanda /set cu money,pp Giftpoints,etc
    • By seek nephrite
      Salut, am un server de stunt si nu mi se salveaza pozitia clanului, skin-ul liderului si al membrilor, gen, ele raman doar cand sunt pe server, daca ies si intru nu se salveaza.
      CMD:msetskin(playerid, params[])
      {
          if(PlayerInfo[playerid][ClanRank] < 5) return SendError(playerid, "Nu esti lider al unui clan!");
          strcat(eString, "{00FF00}Set your clan member skin:");
          ShowPlayerDialog(playerid, DIALOG_CLAN1, DIALOG_STYLE_INPUT, "Clan member skin", eString, "Set", "Close");
          return 1;
      }
      CMD:lsetskin(playerid, params[])
      {
          if(PlayerInfo[playerid][ClanRank] < 5) return SendError(playerid, "Nu esti lider al unui clan!");
          strcat(eString, "{00FF00}Set leader skin id:");
          ShowPlayerDialog(playerid, DIALOG_CLAN2, DIALOG_STYLE_INPUT, "Leader skin", eString, "Set", "Close");
          return 1;
      }
      case DIALOG_CLAN1:
              {
                  if(response)
                  {
                      //------------------------------------------------------------------
                      new MemberSkin;
                      //------------------------------------------------------------------
                      if(sscanf(inputtext, "i", MemberSkin)) return ShowPlayerDialog(playerid, 123, DIALOG_STYLE_INPUT, "{FF0000}ERROR: {FFFFFF}Setting Clan Members Skin", "{00FF00}Please Insert Member Skin of the Clan {FF0000}(1-300)", "Select", "Exit");
                      if(MemberSkin > 300 || MemberSkin < 0) return ShowPlayerDialog(playerid, 123, DIALOG_STYLE_INPUT, "{FF0000}ERROR: {FFFFFF}Setting Clan Members Skin", "{00FF00}Please Insert Member Skin of the Clan {FF0000}(1-300)", "Select", "Exit");
                      //------------------------------------------------------------------
                      if(PlayerInfo[playerid][ClanID] == PlayerInfo[playerid][ClanID]) if(PlayerInfo[playerid][ClanRank] < 2) SetPlayerSkin(playerid, MemberSkin), PlayerInfo[playerid][ClanSkinM] = MemberSkin;
                      format(eQuery, sizeof(eQuery), "UPDATE `clans` SET `ClanMemberSkin` = '%s' WHERE `ID` = %d", PlayerInfo[playerid][ClanSkinM], PlayerInfo[playerid][ClanID]);
                      mysql_tquery(DB_Connect, eQuery, "", "" );
                  }
                  else if(PlayerInfo[playerid][ClanID] == 0) ShowPlayerDialog(playerid, 123, DIALOG_STYLE_INPUT, "{FF0000}ERROR: {FFFFFF}Setting Clan Members Skin", "{00FF00}Please Insert Member Skin of the Clan. {FF0000}(1-300)", "Select", "Exit");
              }
              case DIALOG_CLAN2:
              {
                  if(response)
                  {
                      new BossSkin;
                      //------------------------------------------------------------------
                      if(sscanf(inputtext, "i", BossSkin)) return ShowPlayerDialog(playerid, 123, DIALOG_STYLE_INPUT, "{FF0000}ERROR: {FFFFFF}Setting Clan Leaders Skin", "{00FF00}Please        Insert Boss Skin of the Clan {FF0000}(1-300)", "Select", "Exit");
                      if(BossSkin > 300 || BossSkin < 0) return ShowPlayerDialog(playerid, 123, DIALOG_STYLE_INPUT, "{FF0000}ERROR: {FFFFFF}Setting Clan Leaders Skin", "{00FF00}Please Insert Boss Skin of the Clan {FF0000}(1-300)", "Select", "Exit");
                      //------------------------------------------------------------------
                      format(eQuery, sizeof(eQuery), "UPDATE `clans` SET `ClanLeaderSkin` = '%s' WHERE `ID` = %d", PlayerInfo[playerid][ClanSkinL], PlayerInfo[playerid][ClanID]);
                      mysql_tquery(DB_Connect, eQuery, "", "" );
                      if(PlayerInfo[playerid][ClanID] == PlayerInfo[playerid][ClanID]) if(PlayerInfo[playerid][ClanRank] >= 2) SetPlayerSkin(playerid, BossSkin), PlayerInfo[playerid][ClanSkinL] = BossSkin;
                  }
                  else if(PlayerInfo[playerid][ClanID] == 0) ShowPlayerDialog(playerid, 123, DIALOG_STYLE_INPUT, "{FF0000}ERROR: {FFFFFF}Setting Clan Leaders Skin", "{00FF00}Please Insert Boss Skin of the Clan. {FF0000}(1-300)", "Select", "Exit");
              }
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.