/workuniform

Započeo [ED] ZicMortal, Jun 05, 2010, 07:27:53 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.


Komanda za taj skin je ova:

if(strcmp(cmd, "/posao", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo[playerid][pJob] == ID posla)
{
        SetPlayerSkin(playerid, ID SKINA);
SendClientMessage(playerid, COLOR_DBLUE, "Taj i taj posao");
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
}
return 1;
}
}


Ako zelite i vratit skin na kraju CPa onda, new prosliskin[MAX_PLAYERS];
ongamemodeinit
prosliskin[playerid] = 0;

U komandi

if(strcmp(cmd, "/posao", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo[playerid][pJob] == ID posla)
{
                prosliskin[playerid] = GetPlayerSkin(playerid);//pamti prosli skin
                SetPlayerSkin(playerid, ID SKINA);//novi skin, koji bude imao na poslu
SendClientMessage(playerid, COLOR_DBLUE, "Taj i taj posao");
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];//novi skin, koji bude imao na poslu
PlayerInfo[playerid][pChar] = ChosenSkin[playerid];//novi skin, koji bude imao na poslu
}
return 1;
}
}


OnPlayerEnterCheckpoint

tu dok dode na odredeni CP stavite ovako

SetPlayerSkin(playerid, prosliskin[playerid]);

Mislim da bi moralo raditi.. nisam siguran
Aequam memento rebus in arduis servare mentem.

if(strcmp(cmd, "/pduniform", true) == 0)
   {
    if(IsPlayerConnected(playerid))
    {
      if(PlayerInfo[playerid][pMember]==1 || PlayerInfo[playerid][pLeader]==1)
      {
if(OnDuty[playerid]==0)
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi na duznosti, pisi /duty !");
    return 1;
}
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTI: /pduniform list, zatim /pduniform [skin ID]");
return 1;
  }
    if (PlayerToPoint(3, playerid,255.3851,78.1879,1003.6406) || PlayerToPoint(3,playerid,255.3851,78.1879,1003.6406) || PlayerInfo[playerid][pLocal] != 255)
    {
      if(strcmp(x_nr,"list",true) == 0 && OnDuty[playerid]==1)
        {
SendClientMessage(playerid, COLOR_YELLOW, "_________Lista skinova_________");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "ID 1: Kadet -- Rank 1");
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "ID 2: Pomorski policajac -- Rank 2");
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "ID 3: Prometni policajac -- Rank 3");
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "ID 4: Interventni policajac -- Rank 4");
          SendClientMessage(playerid, COLOR_LIGHTBLUE, "ID 5: Inspektor -- Rank 5");
              SendClientMessage(playerid, COLOR_LIGHTBLUE, "ID 6: Visi inspektor -- Rank 6");
              SendClientMessage(playerid, COLOR_LIGHTBLUE, "ID 7: Inspektor prometne policije -- Rank 7");
              SendClientMessage(playerid, COLOR_LIGHTBLUE, "ID 0: Odlazak s duznosti (normalni skin)");
              return 1;
              }
                else if(strcmp(x_nr,"1",true) == 0 && OnDuty[playerid]==1 && PlayerInfo[playerid][pRank] == 1)
                   {
                       SendClientMessage(playerid, COLOR_WHITE, "   Rank 1 si i mozes uzeti ovaj skin !");
                   SetPlayerSkin(playerid, 284);
                       SendClientMessage(playerid, COLOR_PURPLE, "Obukao si uniformu kadeta.");
                       return 1;
}
           else if(strcmp(x_nr,"2",true) == 0 && OnDuty[playerid]==1 && PlayerInfo[playerid][pRank] == 2)
                   {
                       SendClientMessage(playerid, COLOR_WHITE, "   Rank 2 si i mozes uzeti ovaj skin !");
                      SetPlayerSkin(playerid, 282);
                       SendClientMessage(playerid, COLOR_PURPLE, "Obukao si uniformu pomorskog policajca.");
                       return 1;
                   }
                   else if(strcmp(x_nr,"3",true) == 0 && OnDuty[playerid]==1 && PlayerInfo[playerid][pRank] == 3)
{
   SendClientMessage(playerid, COLOR_WHITE, "   Rank 3 si i mozes uzeti ovaj skin !");
SetPlayerSkin(playerid, 280);
SendClientMessage(playerid, COLOR_PURPLE, "Obukao si uniformu prometnog policajca.");
return 1;
}
                   else if(strcmp(x_nr,"4",true) == 0 && OnDuty[playerid]==1 && PlayerInfo[playerid][pRank] == 4)
                   {
                       SendClientMessage(playerid, COLOR_WHITE, "   Rank 4 si i mozes uzeti ovaj skin !");
                      SetPlayerSkin(playerid, 281);
                       SendClientMessage(playerid, COLOR_PURPLE, "Obukao si uniformu interventnog policajca.");
                       return 1;
}
else if(strcmp(x_nr,"5",true) == 0 && OnDuty[playerid]==1 && PlayerInfo[playerid][pRank] == 5)
{
   SendClientMessage(playerid, COLOR_WHITE, "   Rank 5 si i mozes uzeti ovaj skin !");
                      SetPlayerSkin(playerid, 288);
                       SendClientMessage(playerid, COLOR_PURPLE, "Obukao si uniformu inspektora.");
                       return 1;
}
                   else if(strcmp(x_nr,"6",true) == 0 && OnDuty[playerid]==1 && PlayerInfo[playerid][pRank] == 6)
                   {
                       SendClientMessage(playerid, COLOR_WHITE, "   Rank 6 si i mozes uzeti ovaj skin !");
                      SetPlayerSkin(playerid, 165);
                       SendClientMessage(playerid, COLOR_PURPLE, "Obukao si uniformu viseg inspektora.");
                       return 1;
                   }
                   else if(strcmp(x_nr,"7",true) == 0 && OnDuty[playerid]==1 && PlayerInfo[playerid][pRank] == 7)
                  {
                     SendClientMessage(playerid, COLOR_WHITE, "   Rank 7 si i mozes uzeti ovaj skin !");
                       SetPlayerSkin(playerid, 283);
                       SendClientMessage(playerid, COLOR_PURPLE, "Obukao si uniformu inspektora prometne policije.");
                       return 1;
                   }
                   else if(strcmp(x_nr,"0",true) == 0 && OnDuty[playerid]==1)
                   {
                  if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1)
                      {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string,sizeof(string), "* %s skida svoju uniformu i vraca ju u ormaric.", sendername);
                          ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                          GivePlayerWeapon(playerid, 41, 200);
                          new originalskin = PlayerInfo[playerid][pChar];
SetPlayerSkin(playerid, originalskin);
                       }
}
}
else
               {
                  SendClientMessage(playerid, COLOR_GRAD2, "Nisi u blizini ormarica !");
                  return 1;
               }
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Nisi clan MUP-a !");
               return 1;
}
  }
return 1;
  }


Evo ljudi moja cmd i ja sam to tražio svugdje ali nikako naći, pa sam malo istraživao i napravio svoju cmd, ima prema rankovima, imaju skinovi i kad maknes uniformu vrati ti skin koji si imao i prije... Malo si editujte i to je to, sretno  :P
Poslednja Izmena: Jun 10, 2010, 22:11:49 POSLE PODNE od Renato_ZG_





CroStreets RolePlay Trucking SA-MP Server IP: 88.198.69.101:7797 Web: www.crostreets.com