Jump to content
  • 0

set skin


ruben88

Question

12 answers to this question

Recommended Posts

Ati facut atata spam dar nu i-ati putut da comanda ... omg

if (strcmp(cmd, "/skin", true) == 0 )

{

new skin[256];

skin = strtok(cmdtext, idx);

if (!strlen(skin))

{

SendClientMessage(playerid, COLOR_RED, "Use: /skin [skinid]");

return 1;

}

new newskin = strval(skin);

if ((newskin < 0) || (newskin > 299) || IsInvalidSkin(newskin)) {

SendClientMessage(playerid, COLOR_RED, "Server: This skin does not exist!");

return 1;

}

if (GetPlayerMoney(playerid) >= 0)

{

SetPlayerSkin(playerid, newskin);

GivePlayerMoney(playerid,-0);

format(string, 128, "Server: Skin changed to the id %d, have fun", newskin);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

}

else

{

SendClientMessage(playerid, COLOR_RED, "You can not change skin");

}

return 1;

}

Alta data cauta ca in viata nu prea o sa te ajute multi !

PS: IL pot folosi si playerii nu mai face atatea posturi esti disperaT?

16189165.gifrastamaunbydeejaylobo1.gifsmileysw0181.gif

xmsok6ay41.gif

Link to comment
Share on other sites

sigur o sa primesti warn o sa ma asigur eu :)

if (strcmp(cmd, "/skin", true) == 0 )

  {

      new skin[256];

      skin = strtok(cmdtext, idx);

      if (!strlen(skin))

      {

        SendClientMessage(playerid, COLOR_RED, "Use: /skin [skinid]");

        return 1;

      }

      new newskin = strval(skin);

      if ((newskin < 0) || (newskin > 299) || IsInvalidSkin(newskin)) {

        SendClientMessage(playerid, COLOR_RED, "Server: This skin does not exist!");

        return 1;

      }

      if (GetPlayerMoney(playerid) >= 0)

      {

        SetPlayerSkin(playerid, newskin);

        GivePlayerMoney(playerid,-0);

        format(string, 128, "Server: Skin changed to the id %d, have fun", newskin);

        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

      }

      else

      {

        SendClientMessage(playerid, COLOR_RED, "You can not change skin");

      }

      return 1;

  }

U nu sti sa citesti mai sus lol esti praf frate dupa ce ca nu stii nimic scripting nici macar sa cauti mai esti si stupid pe deasupra ...

                                                                                      LOOSER

16189165.gifrastamaunbydeejaylobo1.gifsmileysw0181.gif

xmsok6ay41.gif

Link to comment
Share on other sites

Poftim Desteptule nici asta nu e buna  http://img811.imageshack.us/img811/1592/82010665.png

Si sa sti ca si eu am cautat destul si tot erurori ami dadea

Dupa ce ca ti-a dat pe masa mai si comentezi!

http://wiki.sa-mp.com/

[ Locked! ]

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.