Korisne skripte i kodovi

Započeo matejdz, Maj 05, 2009, 12:15:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.


Meni onako radi sve kad stavim jos jednu zagradu na kraju

haj stavi ti svoju komandu /LIDERI
SampKucni

 if(strcmp(cmd, "/lideri", true) == 0)
            {
            SendClientMessage(playerid,COLOR_GREEN, "Online Lideri:");
            new LeadersOnline;
             for(new i; i < MAX_PLAYERS; i++)
                    {
                    if(IsPlayerConnected(i))
                    {
                    if(PlayerInfo [i][pLeader] == 1)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* PD Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GRAD3, string);
               }
                if(PlayerInfo  [i][pLeader] == 2)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* FBI Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_DBLUE, string);
               }
                if(PlayerInfo [i][pLeader] == 3)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* SWAT Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
               }
                if(PlayerInfo [i][pLeader] == 4)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* MD Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_RED, string);
               }
               if(PlayerInfo  [i][pLeader] == 5)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* LCN Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_WHITE, string);
               }
               if(PlayerInfo [i][pLeader] == 6)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Y Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GRAD4, string);
               }
               if(PlayerInfo  [i][pLeader] == 7)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Gradonacelnik: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GRAD5, string);
               }
               if(PlayerInfo [i][pLeader] == 8)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Hitman Lider: %s", LeaderName);
                   SendClientMessage(playerid, 0x3333FF, string);
               }
               if(PlayerInfo  [i][pLeader] == 9)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* LS/TV Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_YELLOW2, string);
               }
               if(PlayerInfo  [i][pLeader] == 10)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Taxi Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_YELLOW, string);
               }
               if(PlayerInfo  [i][pLeader] == 11)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Licenser Lider: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_LIGHTRED, string);
               return 1;
            }
         }
      }
    if(LeadersOnline == 0)
      {
          SendClientMessage(playerid, COLOR_GREEN, "[____________________________________].");
      }
   return 1;
}


zna  li netko komandu /dostavi za posao  i gdje ovjde idu koordinate automobila za ovaj posao


Citat
if(strcmp(cmd, "/djurinecarolijekosenje", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
            if(PlayerInfo[playerid][pKosenje] > 0)
            {
                 SendClientMessage(playerid, COLOR_GREY, "*Vec imas aktivirano kosenje!");
                 return 1;
            }
         if(PlayerInfo[playerid][pJob] == id posla)//<---- tu si stavite id koji stavite za taj posao
         {

                   SendClientMessage(playerid,COLOR_PINK,"*Aktivirao si kosenje");
                PlayerInfo[playerid][pKosenje] = 1;//---- tu stavite vrijednos 1 za kosenje za toga igraca
                  SetPlayerCheckpoint(playerid, x1,y1,zy,radius1);// tu stavite koordinate prvog cp-a
         }
         else
         {
              SendClientMessage(playerid, COLOR_GREY, "Nemas posao kosaca trave!");
                return 1;
           }
      }
      return 1;
   }



kada ste to napravili jos morate odraditi sve cp-ove, a za njih nadjite ovo:


public OnPlayerEnterCheckpoint(playerid)


pod tim dodajte ovo:



if(PlayerInfo[playerid][pKosenje] > 0)
    {
//--------ruta1
        if(PlayerToPoint(radius, playerid,x1,y1,z1))//cp1
        {
            if(PlayerInfo[playerid][pKosenje] == 1)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == id vozila za kosenje)//tu stavite id od vozila za kosenje
                  {
                           PlayerInfo[playerid][pKosenje] = 2;// dodajemo vrijednost da se slucajno ne pogodi isti cp, ovo nije potrebno
                           SetPlayerCheckpoint(playerid,x2,y2,z2,radius2);//
                 }
            }
        }
        if(PlayerToPoint(radius2, playerid,x2,y2,z2))//cp2
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == id vozila za kosenje)
                  {
                           PlayerInfo[playerid][pKosenje] = 3;//
                           SetPlayerCheckpoint(playerid,x3,y3,z3,radius3);//
                 }
            }
      }
      .
      .
      .
      .
      .
      .
      .
      .
        if(PlayerToPoint(radiusn, playerid,xn,yn,zn))//cp n-zi
        {
            if(PlayerInfo[playerid][pKosenje] == n)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == id vozila za kosenje)
                  {
                           PlayerInfo[playerid][pKosenje] = 0;//
                           DisablePlayerCheckpoint(playerid);
                           SendClientMessage(playerid, COLOR_GREEN ,"*kosenje uspjesno zavrseno");
//---------------------------------------------------------------ovo ispod nije potrebno
                     GivePlayerMoney(playerid, 100);
                           SendClientMessage(playerid, COLOR_CORAL ,"Zarada = 100$");
                 }
            }
      }
SampKucni

aaaaaaaaaaaaaaaaaa

a daj stavi u CODE kad nesto takvo stavljas.... samo zaspamas celu stranicu  :mad: :mad: :mad: :mad:

Citat: sorfa poslato Avgust 31, 2009, 09:28:34 PRE PODNE
Kad stavim onu od djure komandu pod onplayercommandtext izbaci mi 26 errora.
Evo kako komanda izgleda:
//----------------------------------------/clanovi---------------------------
if ((strcmp(cmdtext, "/clanovi", true)==0)||(strcmp(cmdtext,"/members",true)==0))
   {
         if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ PD clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 1||PlayerInfo[i][pLeader] == 1)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ FBI clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 2||PlayerInfo[i][pLeader] == 2)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ S.W.A.T. clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 3||PlayerInfo[i][pLeader] == 3)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ MD clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 4||PlayerInfo[i][pLeader] == 4)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ LCN clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 5||PlayerInfo[i][pLeader] == 5)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ Yakuza clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 6||PlayerInfo[i][pLeader] == 6)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pLeader] == 8)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ Hitman clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 8||PlayerInfo[i][pLeader] == 8)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 9||PlayerInfo[playerid][pLeader] == 9)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ News clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 9||PlayerInfo[i][pLeader] == 9)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ Taxi clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 10||PlayerInfo[i][pLeader] == 10)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }
         else if(PlayerInfo[playerid][pMember] == 11||PlayerInfo[playerid][pLeader] == 11)
         {
         if(IsPlayerConnected(playerid))
     {
 SendClientMessage(playerid, COLOR_GOLD, "____________ Licenser clanovi online ____________");
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
 if(IsPlayerConnected(i))
 {
     if(PlayerInfo[i][pMember] == 11||PlayerInfo[i][pLeader] == 11)
     {
 GetPlayerName(i, sendername, sizeof(sendername));
 format(string, 256, "    - %s", sendername);
 SendClientMessage(playerid, COLOR_IVORY, string);
 }
 }
 }
   SendClientMessage(playerid, COLOR_GOLD, "__________________________________________");
 }
 return 1;
         }



USPIO SAM!!!

Moras paziti,koliko otvoris zagrada toliko ih i moras zatvorit


Svi koji igraju CS-a neka nam se pridruze (:

Citat: [CH]matejdz poslato Avgust 31, 2009, 07:51:44 PRE PODNE
Ma Bullet kome ti objasnjavas, vidis da nezna osnovu, a onda uzima neke :S naredbe od nekud thumbsup

A ti u buduce potpisi autora inace BANanko BANana tvoja je hrana, BANanko BANana Johny obozaavaaaaa

autor johny  ;D


Svi koji igraju CS-a neka nam se pridruze (:

turker_kc

Citat: Johny poslato Avgust 31, 2009, 13:20:05 POSLE PODNE
Citat: [CH]matejdz poslato Avgust 31, 2009, 07:51:44 PRE PODNE
Ma Bullet kome ti objasnjavas, vidis da nezna osnovu, a onda uzima neke :S naredbe od nekud thumbsup

A ti u buduce potpisi autora inace BANanko BANana tvoja je hrana, BANanko BANana Johny obozaavaaaaa

autor johny  ;D

onda vam je decki garancija da to radi 0% hahahahahahah

Citat: panda poslato Avgust 31, 2009, 13:20:45 POSLE PODNE
Citat: Johny poslato Avgust 31, 2009, 13:20:05 POSLE PODNE
Citat: [CH]matejdz poslato Avgust 31, 2009, 07:51:44 PRE PODNE
Ma Bullet kome ti objasnjavas, vidis da nezna osnovu, a onda uzima neke :S naredbe od nekud thumbsup

A ti u buduce potpisi autora inace BANanko BANana tvoja je hrana, BANanko BANana Johny obozaavaaaaa

autor johny  ;D

onda vam je decki garancija da to radi 0% hahahahahahah

a jbt,ko prvo ne spamaj i da nisam provjerio da radi nebi ni stavio..jer ga i ja koristim n00bino  :mad:


Svi koji igraju CS-a neka nam se pridruze (:

e a moze netko pomoci kako ovo da  se napravi ono da na jedan pickup dodem i upusem posao i uzmem posao dostavljaca i onda uzmem auto i dodem na drugi pickup i upisem /dostva i on mi tek prikaze cp-ove da mogu da voziti robu neku

pls pomoććć skripteri
SampKucni

zerocoolos

Citat: Nodypocetnik poslato Avgust 31, 2009, 14:02:45 POSLE PODNE
e a moze netko pomoci kako ovo da  se napravi ono da na jedan pickup dodem i upusem posao i uzmem posao dostavljaca i onda uzmem auto i dodem na drugi pickup i upisem /dostva i on mi tek prikaze cp-ove da mogu da voziti robu neku

pls pomoććć skripteri

pa eto imas posao kosenje pa ga modificiraj i imat ces i dostavu...

meni nikako ne radi /members izbaci 26 erora nesto player to point not impladeted :'(

zerocoolos