PARTNERI:

* Marketing


-UPOZORENJE-

Samo registrovani članovi mogu da vide/koriste forum u celini.
Prijavite se ili registrujte nalog na Balkan SA-MP forumu.


Autor Tema: /clear  (Pročitano 1439 puta)

0 članova i 1 gost pregledaju ovu temu.

Van mreže [BM]Daka

  • Transformer
  • *
  • Poruke: 212
/clear
« poslato: Jun 20, 2009, 21:05:54 posle podne »
Trebao bi pomoc oko komande /clear neradi mi nikako u modu sta god napravim nece :S



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.
 

Odg: /clear
« Odgovor #1 poslato: Jun 21, 2009, 05:27:51 pre podne »
Meni isto na kucnom,dok napisem /cc crasha mi samp-server.exe...


Probaj onih puno linija prazni staviti! :D :D :D
 

Van mreže admin

Odg: /clear
« Odgovor #2 poslato: Jun 21, 2009, 09:44:58 pre podne »
Meni isto na kucnom,dok napisem /cc crasha mi samp-server.exe...


Probaj onih puno linija prazni staviti! :D :D :D

Problem i jeste u puno linija, previse ih ocito stavite pa zato crasha, probaj smanjiti broj praznih linija.
 

Odg: /clear
« Odgovor #3 poslato: Jun 21, 2009, 09:46:10 pre podne »
smanjim ali dzaba ti je,o5 isto
 

Van mreže [BM]Daka

  • Transformer
  • *
  • Poruke: 212
Odg: /clear
« Odgovor #4 poslato: Jun 21, 2009, 11:16:19 pre podne »
Oce mi ko odgovorit :S na pocetku je radio i evo sda mjesec poslije neradi :S



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.
 

Odg: /clear
« Odgovor #5 poslato: Jun 21, 2009, 12:05:05 posle podne »
Evo ovo ja koristim,kad budes clearo moras 2x /cc



if(!strcmp(cmdtext, "/clearchat", true) || !strcmp(var6, "/cc", true))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
SendClientMessageToAll(0xFFFFFFAA, " ");
return 1;
}
}
 

Van mreže ...CaspeR...

  • Newbie
  • *
  • Poruke: 22
  • Pol: Muškarac
Odg: /clear
« Odgovor #6 poslato: Jun 21, 2009, 12:18:14 posle podne »
ima i ovaj način ;)
if(!strcmp(cmdtext, "/cc", true))
    {
       if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
       {
           for(new chat = 0; chat <= 50; chat++) SendClientMessageToAll(COLOR_GREEN, " ");
         GetPlayerName(playerid, sendername, 20);
         format(string, 256, "-| Admin %s je pocistio chat |-", sendername);
         SendClientMessageToAll(COLOR_GREEN, string);
         return 1;
      }
      else SendClientMessage(playerid, COLOR_RED, "Nisi admin!");
      return 1;
    }
 

Van mreže dinkO14

  • Balkan SA:MP Legenda
  • Soldier
  • *
  • Poruke: 685
  • Pol: Muškarac
Odg: /clear
« Odgovor #7 poslato: Jun 21, 2009, 12:21:49 posle podne »
njemu neradi /clear za pd kolko sam upoznat sa situacijom
 

Odg: /clear
« Odgovor #8 poslato: Jun 21, 2009, 14:24:20 posle podne »
hahaha jbg mogo je se bolje izjasnit,jer vise sam puta cuo za ovaj problem (sta sam ja postao) nego njegov
 

zerocoolos

  • Gost
Odg: /clear
« Odgovor #9 poslato: Jun 21, 2009, 15:23:44 posle podne »
ima i ovaj način ;)
if(!strcmp(cmdtext, "/cc", true))
    {
       if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
       {
           for(new chat = 0; chat <= 50; chat++) SendClientMessageToAll(COLOR_GREEN, " ");
         GetPlayerName(playerid, sendername, 20);
         format(string, 256, "-| Admin %s je pocistio chat |-", sendername);
         SendClientMessageToAll(COLOR_GREEN, string);
         return 1;
      }
      else SendClientMessage(playerid, COLOR_RED, "Nisi admin!");
      return 1;
    }

jedino sto ovo nece valjat, sta ti for petlja radi???
Popravljeno:

if(!strcmp(cmdtext, "/cc", true))
    {
       if(PlayerInfo[playerid][pAdmin] >= 1)
       {
         for(new chat = 0; chat <= 50; chat++)
         {       
              SendClientMessageToAll(COLOR_GREEN, " ");
         }
         GetPlayerName(playerid, sendername, 20);
         format(string, 256, "-| Admin %s je pocistio chat |-", sendername);
         SendClientMessageToAll(COLOR_GREEN, string);
         return 1;
      }
      else SendClientMessage(playerid, COLOR_RED, "Nisi admin!");
      return 1;
    }
 

Van mreže [BM]Daka

  • Transformer
  • *
  • Poruke: 212
Odg: /clear
« Odgovor #10 poslato: Jun 21, 2009, 15:48:30 posle podne »
njemu neradi /clear za pd kolko sam upoznat sa situacijom

da lol meni treba /clear za pd



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.
 

Correlli

  • Gost
Odg: /clear
« Odgovor #11 poslato: Jun 21, 2009, 15:51:34 posle podne »
Vidim puno vas koristi dužinu stringa 256. Ne treba vam 256, bolje je da koristite 128.
 

Van mreže [BM]Daka

  • Transformer
  • *
  • Poruke: 212
Odg: /clear
« Odgovor #12 poslato: Jun 21, 2009, 20:21:47 posle podne »
if(strcmp(cmd, "/clear", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
new member = PlayerInfo[playerid][pMember];
new leader = PlayerInfo[playerid][pLeader];
new rank = PlayerInfo[playerid][pRank];
if(IsACop(playerid))
{
if (!PlayerToPoint(3.0, playerid, 253.9280,69.6094,1003.6406))
{
SendClientMessage(playerid, COLOR_GRAD2, "   You are to not inside the Police Station!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /clear [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
                        if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Clear yourself!"); return 1; }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Officer %s has cleared your Records and Wanted Points.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
ClearCrime(giveplayerid);
if(gTeam[giveplayerid]==4)
{
    gTeam[giveplayerid] = 3;
    SetPlayerToTeamColor(giveplayerid);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Invalid ID/Name!");
}
}
else if(member == 5||member == 6||leader == 5||leader == 6)
{
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /clear [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Clear yourself!"); return 1; }
    if(rank < 4) { SendClientMessage(playerid, COLOR_GREY, "   You need Rank 4 to clear someone's Wanted Points + Records!"); return 1; }
    if(GetPlayerMoney(playerid) < 5000) { SendClientMessage(playerid, COLOR_GREY, "   You need $5000 to Clear your Family Member!"); return 1; }
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
    if(member > 0)
    {
    if(PlayerInfo[giveplayerid][pMember] != member)
{
SendClientMessage(playerid, COLOR_GREY, "   That player is not in your Family!");
return 1;
}
format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s for $5000.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Family Member %s with Rank %d, has cleared your Records and Wanted Points.", sendername, rank);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
}
else if(leader > 0)
{
                if(PlayerInfo[giveplayerid][pMember] != leader)
{
SendClientMessage(playerid, COLOR_GREY, "   That player is not in your Family!");
return 1;
}
    format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s for $5000.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Family Leader %s, has cleared your Records and Wanted Points.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
}
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
ClearCrime(giveplayerid);
GivePlayerMoney(playerid, - 500);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Invalid ID/Name!");
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   You are not an Cop / FBI / Family Member!");
}
}//not connected
return 1;
}

Ko zna u cemu je BUG



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.
 

zerocoolos

  • Gost
Odg: /clear
« Odgovor #13 poslato: Jun 21, 2009, 20:45:42 posle podne »
mozda playertopoint koordinate nisu gdje ti pokusavas aktivirat komandu...
 

Van mreže [BM]Daka

  • Transformer
  • *
  • Poruke: 212
Odg: /clear
« Odgovor #14 poslato: Jun 21, 2009, 20:48:01 posle podne »
jesu ali kad ukucam clear nece nista da se pojavi ni ono niste u pd i sl. isto ko da i nisam ukuco :S

EDIT: Rjesio sam ;) LOKOT
« Poslednja izmena: Jun 21, 2009, 21:19:32 posle podne [BM]Daka »



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.