[Pomoc]/ekazi

Započeo Medis, Septembar 28, 2011, 00:38:41 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Moj mod
Detaljan opis problema:Naravio sma komandu /ekazi /jail /unjail i izbaci mi neke erore pomoc molim
Dio skripte:
1.
if(strcmp(cmd, "/ekazi", true) == 0 || strcmp(cmd, "/e", true) == 0)
   {
      GetPlayerName(playerid, sendername, sizeof(sendername));
      new length = strlen(cmdtext);
      while ((idx < length) && (cmdtext[idx] <= ' '))
      {
         idx++;
      }
      new offset = idx;
      new result[64];
      while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
      {
         result[idx - offset] = cmdtext[idx];
         idx++;
      }
      
2.//Jail
   if(strcmp(cmd, "/ajail", true) == 0)
   {
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
         SendClientMessage(playerid, COLOR_GRAD2, "Pisi: /ajail [id igraca/Dio imena] [seconds]");
         return 1;
      }
      if(IsStringAName(tmp))
      {
         giveplayerid = GetPlayerID(tmp);
         //printf("stringnameid %d",giveplayerid);
      }
      else
      {
         giveplayerid = strval(tmp);
      }
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
         SendClientMessage(playerid, COLOR_GRAD2, "Pisi: /ajail [id igraca/Dio imena] [seconds]");
         return 1;
      }
      new time = strval(tmp);

      if (IsPlayerConnected(giveplayerid))
      {
         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
         GetPlayerName(playerid, sendername, sizeof(sendername));
         if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 2)
         {
            SetPlayerInterior(giveplayerid,0);
            PlayerInfo[giveplayerid][pInt] = 6;
                SetPlayerPos(giveplayerid,-1466.0790,-204.5713,6.0000);
            format(string, sizeof(string), "Stavio si %s(player: %d) u areu.", giveplayer,giveplayerid);
            //printf("Admin: %s has jailed %s.", sendername, giveplayer);
            SendClientMessage(playerid, COLOR_GRAD1, string);
            SendClientMessage(giveplayerid, COLOR_GREEN,"Zatvoren si u areu od strane admina!");
            SendClientMessage(giveplayerid, COLOR_GREEN,"Ako mislis da je greska slikaj sa(f8) i postaj na forum!");
            PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
            JailTime[giveplayerid] = time+10;
            //TogglePlayerControllable(giveplayerid, 0);
            return 1;
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}RedAS{FFFFFF}]{CCCCCC}Admini samo!");
            return 1;
         }
      }
      else
      {
         format(string, sizeof(string), "   %d nije aktivan igrac!", giveplayerid);
         SendClientMessage(playerid, COLOR_GRAD1, string);
      }
      return 1;
   }
   if(strcmp(cmd, "/jail", true) == 0)
   {
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
         SendClientMessage(playerid, COLOR_GRAD2, "Pisi: /jail");
         return 1;
      }
      giveplayerid = strval(tmp);
      if(JailTime[giveplayerid] > 0 || gTeam[giveplayerid] != 4)
      {
         SendClientMessage(playerid, COLOR_GRAD2, "|A|Warning | Ta osoba nemoze upravo sada biti Zatvorena.");
         printf("JailTime[giveplayerid](%d) gTeam[giveplayerid](%d)",JailTime[giveplayerid],gTeam[giveplayerid]);
         return 1;
      }
      if (IsPlayerConnected(giveplayerid))
      {
         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
         GetPlayerName(playerid, sendername, sizeof(sendername));
         if (gTeam[playerid] == TEAM_BLUE)
         {
            if (TestDistance(playerid,giveplayerid,264.395200,77.564040,1001.039000,7))
            {
               //print("DEBUG Distancetested");
               new slice = ((PlayerInfo[giveplayerid][pLevel]*deathcost)+(1000)); //1k +your level
               SetPlayerPos(giveplayerid,264.395200,77.564040,1001.039000);
               GivePlayerMoney(playerid, slice);
               GivePlayerMoney(giveplayerid, -slice);
               PlayJailSound(1165 , 1166, 2000,264.395200, 77.564040, 1001.039000);
               format(string, sizeof(string), "~r~Suspect ~w~Detained~n~You Get ~g~$%d", slice);
               GameTextForPlayer(playerid, string, 5000, 1);
               format(string, sizeof(string), "~r~JAIL~n~~w~You Are fined ~n~~r~$%d", -slice);
               GameTextForPlayer(giveplayerid, string, 5000, 1);
               PlayerPlayMusic(playerid);
               JailTime[giveplayerid] = jailtime;
               SetPlayerFree(giveplayerid,playerid,"Serving Prison Sentence",0,0);
               if(FlashTime[giveplayerid] == 0){FlashTime[giveplayerid] = 10;}
               //TogglePlayerControllable(giveplayerid, 0);
               return 1;
            }
            else
            {
               SendClientMessage(playerid, COLOR_GRAD1, "   one of you is to far away from a jail cell!");
               return 1;
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}RedAS{FFFFFF}]{CCCCCC}Admini samo!");
            return 1;
         }
      }
      else
      {
         format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
         SendClientMessage(playerid, COLOR_GRAD1, string);
      }
      return 1;
   }
// Unjail cmd
if(strcmp(cmd, "/unjail", true) == 0)
   {
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
         SendClientMessage(playerid, COLOR_GRAD2, "Pisi: /unjail [id igraca/Dio imena]");
         return 1;
      }
      if(IsStringAName(tmp))
      {
         giveplayerid = GetPlayerID(tmp);
      }
      else
      {
         giveplayerid = strval(tmp);
      }
      if (IsPlayerConnected(giveplayerid))
      {
         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
         GetPlayerName(playerid, sendername, sizeof(sendername));
         if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 2)
         {
            SetPlayerInterior(giveplayerid,0);
            PlayerInfo[playerid][pInt] = 6;
                SetPlayerPos(giveplayerid,268.3,77.4,1001.0);
            format(string, sizeof(string), "|A|Sloboda %s(player: %d)", giveplayer,giveplayerid);
            printf("Admin: %s has jailed %s.", sendername, giveplayer);
            SendClientMessage(playerid, COLOR_ORANGERED, string);
            SetPlayerWeapons(playerid);
            SendClientMessage(giveplayerid, COLOR_GRAD1,"Platili ste dug drustvu,pokusajte biti bolji gradanin!");
            PlayJailSound(1165 , 1166, 2000,264.395200, 77.564040, 1001.039000);
            JailTime[giveplayerid] = 10;
            //TogglePlayerControllable(giveplayerid, 0);
            return 1;
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}RedAS{FFFFFF}]{CCCCCC}Admini samo!");
            return 1;
         }
      }
      else
      {
         format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
         SendClientMessage(playerid, COLOR_GRAD1, string);
      }
      return 1;
   }
errori:
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1947) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1951) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1963) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1967) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1971) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1975) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1979) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1983) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1987) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(1999) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2003) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2007) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2011) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2015) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2027) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2031) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2035) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2047) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2051) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(2055) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(4286) : error 004: function "CrimInRange" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(4634) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(5243) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(5313) : error 004: function "ProxDetector" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(6024) : error 004: function "ProxDetector" is not implemented
C:\Users\Computer\Desktop\medis\Mode\CroBiH\gamemodes\crobih.pwn(6040) : error 004: function "ProxDetector" is not implemented

Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Pravim modove i FS-ove javite mi se na PM za drugo samo $$$$$$$$$

Fali ti negdje '{' ili '}'
prebroj sve te, za svaku otvorenu moras imati i zatvorenu,znaci paran broj ;)

to sam vec uradio ali na mom dm modu to moze da radi super ali ovdje ne ide jel treba sta dodat ili nesto
Pravim modove i FS-ove javite mi se na PM za drugo samo $$$$$$$$$

Citat: pHon poslato Septembar 28, 2011, 00:41:38 PRE PODNE
Fali ti negdje '{' ili '}'
prebroj sve te, za svaku otvorenu moras imati i zatvorenu,znaci paran broj ;)

PlayerToPoint i te gluposti ti dolaze zbog tih '{' '}'
znaci moras naci u svakoj komandi.
Poslednja Izmena: Septembar 28, 2011, 00:44:59 PRE PODNE od pHon

evo ti linije pa pogledaj nigdje ne mogu nac gresku :D

1947:if(PlayerToPoint(1.0,playerid,403.8266,-2088.7598,7.8359) || PlayerToPoint(1.0,playerid,398.7553,-2088.7490,7.8359))
1953:else if(PlayerToPoint(1.0,playerid,396.2197,-2088.6692,7.8359) || PlayerToPoint(1.0,playerid,391.1094,-2088.7976,7.8359))

ima toga jos ali ako je tu problem ne mogu vjerovati
A da ne treba sta dodati ispod OnGameModeInit ili napraviti newto new poput tog
Pravim modove i FS-ove javite mi se na PM za drugo samo $$$$$$$$$

makni komande i complilaj pa ces vidit da je do komandi...
Vratio sam se ponovo ocekjute novi server...

eto kako si ti pametan radio sam to do gm-a je jel gledaj na jednom gm-u radi na drugom gm-u ne radi nema logike
Pravim modove i FS-ove javite mi se na PM za drugo samo $$$$$$$$$

E moj ti pa kako ti mislis da ti radi nesto iz GF-a na Tvom modu koji uopste nema iste varijable nema isti sistem?


Da li je to editovani ili mod od 0? Ako je editovani daj nam ime tog moda koji editujes!
Poslednja Izmena: Septembar 28, 2011, 10:36:17 PRE PODNE od MicroD

mod je haman pa od 0 raden jel ni jedna komanda rdila nije, bilo je errora koliko hoces, sve sam pobriso sa njega osim neke vaznije komande, posto je bio pun bugova auta su bila ali opet je mod ja msm gf edit pa ako mozes reci
Pravim modove i FS-ove javite mi se na PM za drugo samo $$$$$$$$$

Citat: Medis poslato Septembar 28, 2011, 09:25:21 PRE PODNE
evo ti linije pa pogledaj nigdje ne mogu nac gresku :D

1947:if(PlayerToPoint(1.0,playerid,403.8266,-2088.7598,7.8359) || PlayerToPoint(1.0,playerid,398.7553,-2088.7490,7.8359))
1953:else if(PlayerToPoint(1.0,playerid,396.2197,-2088.6692,7.8359) || PlayerToPoint(1.0,playerid,391.1094,-2088.7976,7.8359))

ima toga jos ali ako je tu problem ne mogu vjerovati
A da ne treba sta dodati ispod OnGameModeInit ili napraviti newto new poput tog

Koliko sam ja primjetia na RP Modovime vise ne postoji PlayerToPoint nego IsPlayerInRangeOfPonint(playerid, range, x, y, z) probaj to zaminit mozda je do toga