[Pomoc] U vezi /jaila. opet :/

Započeo Zenga1998, Jun 11, 2011, 12:26:52 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Skripta koju koristim:GF Edit
Detaljan opis problema:Znaci imam /zatvor komandu tj /jail i sad kad na srv idem /zatvor Mario 9 MG onda pise samo Zatvoreni ste od admina .... vrijem 9 Minuta i zadnje Razlog: al ne pise nista u razlogu :// kako da to popravim
Dio skripte:


SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /zatvor [playerid/DioImena] [vrijeme(minuti)] [Razlog]");
return 1;
}
new playa;
new money;
new result[128];
playa = ReturnUser(tmp);
  tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
{
if(IsPlayerConnected(playa))
   {
       if(playa != INVALID_PLAYER_ID)
       {
       GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Zatvorio si %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Zatvoren si od admina %s na %d minuta Razlog: %d", sendername, money, (result));
SendClientMessage(playa, COLOR_LIGHTRED, string);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
format(string, sizeof(string), "Zatvoren si za %d minuta.   Jamcevina: Nedostipna", money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
SetPlayerWantedLevel(giveplayerid, 0);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten!");
}
}
return 1;
Poslednja Izmena: Jun 11, 2011, 14:37:50 POSLE PODNE od [LYG] $--L84S--$

stavi ovako :
   SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /zatvor [playerid/DioImena] [vrijeme(minuti)] [Razlog]");
            return 1;
         }
         new playa;
         new money;
         new result[128];
         playa = ReturnUser(tmp);
   tmp = strtok(cmdtext, idx);
         money = strval(tmp);
         if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
         {
            if(IsPlayerConnected(playa))
             {
                 if(playa != INVALID_PLAYER_ID)
                 {
                    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, sizeof(string), "* Zatvorio si %s.", giveplayer);
                  SendClientMessage(playerid, COLOR_LIGHTRED, string);
                  format(string, sizeof(string), "* Zatvoren si od admina %s na %d minuta Razlog: %s", sendername, money, (result));
                  SendClientMessage(playa, COLOR_LIGHTRED, string);
                  ResetPlayerWeapons(playa);
                  WantedPoints[playa] = 0;
                  PlayerInfo[playa][pJailed] = 1;
                  PlayerInfo[playa][pJailTime] = money*60;
                  SetPlayerInterior(playa, 6);
                  SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
                  format(string, sizeof(string), "Zatvoren si za %d minuta.   Jamcevina: Nedostipna", money);
                  SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                  SetPlayerWantedLevel(giveplayerid, 0);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten!");
         }
      }
      return 1;

try
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /zatvor [playerid/DioImena] [vrijeme(minuti)] [Razlog]");
            return 1;
         }
         new playa;
         new money;
         new result[128];
         playa = ReturnUser(tmp);
   tmp = strtok(cmdtext, idx);
         money = strval(tmp);
         if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
         {
            if(IsPlayerConnected(playa))
             {
                 if(playa != INVALID_PLAYER_ID)
                 {
                    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, sizeof(string), "* Zatvorio si %s.", giveplayer);
                  SendClientMessage(playerid, COLOR_LIGHTRED, string);
                  format(string, sizeof(string), "* Zatvoren si od admina %s na %d minuta Razlog: %d", sendername, money, result);
                  SendClientMessage(playa, COLOR_LIGHTRED, string);
                  ResetPlayerWeapons(playa);
                  WantedPoints[playa] = 0;
                  PlayerInfo[playa][pJailed] = 1;
                  PlayerInfo[playa][pJailTime] = money*60;
                  SetPlayerInterior(playa, 6);
                  SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
                  format(string, sizeof(string), "Zatvoren si za %d minuta.   Jamcevina: Nedostipna", money);
                  SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                  SetPlayerWantedLevel(giveplayerid, 0);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten!");
         }
      }
      return 1;

Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Probo sam i opet pise Razlog: Evo ti slikaa  http://www.zaslike.com/viewer.php?file=8oj9flp78beb4cdu8b9a.png

@ Sistem tak mi crasha compiler..... sa tim kodom
Poslednja Izmena: Jun 11, 2011, 12:42:28 POSLE PODNE od Zenga1998

Citat: Zenga1998 poslato Jun 11, 2011, 12:37:15 POSLE PODNE
Probo sam i opet pise Razlog: Evo ti slikaa  http://www.zaslike.com/viewer.php?file=8oj9flp78beb4cdu8b9a.png
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /zatvor [playerid/DioImena] [vrijeme(minuti)] [Razlog]");
            return 1;
         }
         new playa;
         new money;
         new result[640];
         playa = ReturnUser(tmp);
   tmp = strtok(cmdtext, idx);
         money = strval(tmp);
         if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
         {
            if(IsPlayerConnected(playa))
             {
                 if(playa != INVALID_PLAYER_ID)
                 {
                    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, sizeof(string), "* Zatvorio si %s.", giveplayer);
                  SendClientMessage(playerid, COLOR_LIGHTRED, string);
                  format(string, sizeof(string), "* Zatvoren si od admina %s na %d minuta Razlog: %s", sendername, money, (result));
                  SendClientMessage(playa, COLOR_LIGHTRED, string);
                  ResetPlayerWeapons(playa);
                  WantedPoints[playa] = 0;
                  PlayerInfo[playa][pJailed] = 1;
                  PlayerInfo[playa][pJailTime] = money*60;
                  SetPlayerInterior(playa, 6);
                  SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
                  format(string, sizeof(string), "Zatvoren si za %d minuta.   Jamcevina: Nedostipna", money);
                  SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                  SetPlayerWantedLevel(giveplayerid, 0);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten!");
         }
      }
      return 1;

Tako stavi pa provjeri.

Citat: [LYG] $--L84S--$ poslato Jun 11, 2011, 12:41:06 POSLE PODNE
Citat: Zenga1998 poslato Jun 11, 2011, 12:37:15 POSLE PODNE
Probo sam i opet pise Razlog: Evo ti slikaa  http://www.zaslike.com/viewer.php?file=8oj9flp78beb4cdu8b9a.png
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /zatvor [playerid/DioImena] [vrijeme(minuti)] [Razlog]");
            return 1;
         }
         new playa;
         new money;
         new result[640];
         playa = ReturnUser(tmp);
   tmp = strtok(cmdtext, idx);
         money = strval(tmp);
         if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
         {
            if(IsPlayerConnected(playa))
             {
                 if(playa != INVALID_PLAYER_ID)
                 {
                    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, sizeof(string), "* Zatvorio si %s.", giveplayer);
                  SendClientMessage(playerid, COLOR_LIGHTRED, string);
                  format(string, sizeof(string), "* Zatvoren si od admina %s na %d minuta Razlog: %s", sendername, money, (result));
                  SendClientMessage(playa, COLOR_LIGHTRED, string);
                  ResetPlayerWeapons(playa);
                  WantedPoints[playa] = 0;
                  PlayerInfo[playa][pJailed] = 1;
                  PlayerInfo[playa][pJailTime] = money*60;
                  SetPlayerInterior(playa, 6);
                  SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
                  format(string, sizeof(string), "Zatvoren si za %d minuta.   Jamcevina: Nedostipna", money);
                  SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                  SetPlayerWantedLevel(giveplayerid, 0);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten!");
         }
      }
      return 1;

Tako stavi pa provjeri.

Ima 26 errora :/

Provjeri broj zagrada {} mora biti jednak.

Probaj ovo

if(strcmp(cmd, "/zatvor", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /zatvor [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
{
   if(IsPlayerConnected(playa))
   {
       if(playa != INVALID_PLAYER_ID)
       {
       GetPlayerName(playa, giveplayer, sizeof(giveplayer));
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++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
format(string, sizeof(string), "* Zatvorili ste %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Stavljeni ste u zatvor od Admina %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
PlayerInfo[playa][pInt] = 6;
SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
format(string, sizeof(string), "U zatvoru ste na %d minuta.   Jamcevina: Nemoguca", money);
SendClientMessage(playa, COLOR_WHITE, string);
format(string, 256, "AdmCmd: %s je zatvoren od Admina %s [Razlog: %s]", giveplayer, sendername, (result));
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s je stavljen u zatvoru od %s [Razlog: %s]", giveplayer, sendername, (result));
printf("%s",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani za koristenje te komande!");
}
}
return 1;
}
Poslednja Izmena: Jun 11, 2011, 16:20:17 POSLE PODNE od [AG]Niki
Menjam Steam 1800+ igrica za Molten WoW -Ragnaros accl! PM!!

Citat: [AG]Niki poslato Jun 11, 2011, 16:19:36 POSLE PODNE
Probaj ovo

if(strcmp(cmd, "/zatvor", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /zatvor [playerid/PartOfName] [time(minutes)] [reason]");
return 1;


Hvala ti :**** Mozete Lock
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
{
   if(IsPlayerConnected(playa))
   {
       if(playa != INVALID_PLAYER_ID)
       {
       GetPlayerName(playa, giveplayer, sizeof(giveplayer));
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++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
format(string, sizeof(string), "* Zatvorili ste %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Stavljeni ste u zatvor od Admina %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
PlayerInfo[playa][pInt] = 6;
SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
format(string, sizeof(string), "U zatvoru ste na %d minuta.   Jamcevina: Nemoguca", money);
SendClientMessage(playa, COLOR_WHITE, string);
format(string, 256, "AdmCmd: %s je zatvoren od Admina %s [Razlog: %s]", giveplayer, sendername, (result));
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s je stavljen u zatvoru od %s [Razlog: %s]", giveplayer, sendername, (result));
printf("%s",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani za koristenje te komande!");
}
}
return 1;
}