Molim vas pomoc u vezi /ticket

Započeo [CM] BrunoHP, Februar 13, 2010, 20:19:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Meni ne valja komanda ticket i jeli bi mi netko dati komandu koja radi, molim vas

Citat: BrunoHP poslato Februar 13, 2010, 20:19:37 POSLE PODNE
Meni ne valja komanda ticket i jeli bi mi netko dati komandu koja radi, molim vas

Stavi ovdje komandu, da se moze pogledati sta je pogresno u njoj pa da ti isprave...

Citatif(strcmp(cmd, "/ticket", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3)
         {
             tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /ticket [playerid/PartOfName] [price] [razlog]");
               return 1;
            }
            giveplayerid = ReturnUser(tmp);
               tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /ticket [playerid/PartOfName] [price] [razlog]");
               return 1;
            }
            moneys = strval(tmp);
            if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, "   Kazna nemoze biti ispod 1 ili veci od 99999 !"); return 1; }
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if (ProxDetectorS(8.0, playerid, giveplayerid))
                  {
                      GetPlayerName(giveplayerid, 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, "KORISTI: /ticket [playerid/PartOfName] [price] [reason]");
                        return 1;
                     }
                     format(string, sizeof(string), "* Dao si %s kaznu cjene $%d, razlog: %s", giveplayer, moneys, (result));
                     SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                     format(string, sizeof(string), "* Policajac %s dao ti je kaznu cjene $%d, razlog: %s", sendername, moneys, (result));
                     SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                     SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* Pisi /accept ticket, za prihvatit.");
                     TicketOffer[giveplayerid] = playerid;
                     TicketMoney[giveplayerid] = moneys;
                     return 1;
                  }
                  else
                  {
                     SendClientMessage(playerid, COLOR_GREY, "   Igrac nije blizu tebe !");
                     return 1;
                  }
               }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Igrac je Offline !");
                return 1;
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GREY, "  Niste clan MUPA !");
            return 1;
         }
      }
      return 1;
   }


hahahha warning = demir
CitatLose,Lose,Lose,Lose Prelose 0/10 nema nista tu to je 1 sek rada..... za nas profesionalce i dobre scritpere ....

ja sam najaci scripter na balkan a mozda i u svijet to je za mene stotinka....

Evo vam komanda koja ima bug, molim vas ako mi budete ispravljali ispravite da ne izbaci warninge da je kriva indetifikacija

if(strcmp(cmd, "/ticket", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(IsACop(playerid))
{
    SendClientMessage(playerid, COLOR_GREY, "Niste policajac !");
    return 1;
}
        if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
{
    SendClientMessage(playerid, COLOR_GREY, "Niste na duznosti!");
    return 1;
}
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /ticket [ID/Ime] [cijena] [razlog]");
return 1;
}
giveplayerid = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /ticket [ID/Ime] [cijena] [razlog]");
return 1;
}
moneys = strval(tmp);
if(moneys < 50 || moneys > 10000) { SendClientMessage(playerid, COLOR_GREY, "Kazna ne moze stajati ispod $50 ili iznad $10000 !"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if (ProxDetectorS(8.0, playerid, giveplayerid))
{
    GetPlayerName(giveplayerid, 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, "KORISTITE: /ticket [ID/Ime] [cijena] [razlog]");
return 1;
}
format(string, sizeof(string), "* Dali ste %s kaznu koja stoji $%d, razlog: %s", giveplayer, moneys, (result));
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* Policajac %s vam je dao kaznu koja stoji $%d, razlog: %s", sendername, moneys, (result));
SendClientMessage(giveplayerid, COLOR_WHITE, string);
SendClientMessage(giveplayerid, COLOR_WHITE, "* Koristite /accept ticket, da prihvatite.");
TicketOffer[giveplayerid] = playerid;
TicketMoney[giveplayerid] = moneys;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije pokraj vas !");
return 1;
}
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac je Offline !");
    return 1;
}
}
return 1;
}

pa dao sam ti ju

hahahha warning = demir
CitatLose,Lose,Lose,Lose Prelose 0/10 nema nista tu to je 1 sek rada..... za nas profesionalce i dobre scritpere ....

ja sam najaci scripter na balkan a mozda i u svijet to je za mene stotinka....

if(IsACop(playerid))

promjeni u

if(!IsACop(playerid))

Tebi je sad ako si policajac da pise "niste policajac".




GameMode je u izradi(0.1 %). Ovaj Game Mode nije edit bilo kojeg vec postojeceg gamemoda. Ovaj mod se radi od nule.

www.domino-samp.net | Portal i Forum Otvoreni
IP: 188.72.226.228:7777 | Server za zezanciju sa LARP modom.

e fala ti, jos me muci za aute, clan org kada ude u auto pise kao da nije clan, de pls popravi

if(newcar == 160)
{
    if(PlayerInfo[playerid][pMember] != 8 || PlayerInfo[playerid][pLeader] != 8)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Niste clan !");
    RemovePlayerFromVehicle(playerid);
    }
}

Citat: BrunoHP poslato Februar 13, 2010, 21:37:29 POSLE PODNE
e fala ti, jos me muci za aute, clan org kada ude u auto pise kao da nije clan, de pls popravi

if(newcar == 160)
{
    if(PlayerInfo[playerid][pMember] != 8 || PlayerInfo[playerid][pLeader] != 8)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Niste clan !");
    RemovePlayerFromVehicle(playerid);
    }
}


Ja ti imam ovako...ovaj red
if(PlayerInfo[playerid][pMember] != 8 || PlayerInfo[playerid][pLeader] != 8)
Mora izgledat ovako
if(PlayerInfo[playerid][pMember] = 8 || PlayerInfo[playerid][pLeader] = 8)

Citat: °|Chris|° poslato Februar 13, 2010, 21:41:00 POSLE PODNE
Citat: BrunoHP poslato Februar 13, 2010, 21:37:29 POSLE PODNE
e fala ti, jos me muci za aute, clan org kada ude u auto pise kao da nije clan, de pls popravi

if(newcar == 160)
{
    if(PlayerInfo[playerid][pMember] != 8 || PlayerInfo[playerid][pLeader] != 8)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Niste clan !");
    RemovePlayerFromVehicle(playerid);
    }
}


Ja ti imam ovako...ovaj red
if(PlayerInfo[playerid][pMember] != 8 || PlayerInfo[playerid][pLeader] != 8)
Mora izgledat ovako
if(PlayerInfo[playerid][pMember] = 8 || PlayerInfo[playerid][pLeader] = 8)

To ti nebu radilo

Stavi ovako:

if(newcar == 160)
{
    if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
                    else
    {
        SendClientMessage(playerid, COLOR_GREY, "   Niste clan !");
    RemovePlayerFromVehicle(playerid);
    }
}




GameMode je u izradi(0.1 %). Ovaj Game Mode nije edit bilo kojeg vec postojeceg gamemoda. Ovaj mod se radi od nule.

www.domino-samp.net | Portal i Forum Otvoreni
IP: 188.72.226.228:7777 | Server za zezanciju sa LARP modom.