[POMOC] /B /sms

Započeo [CH]Ivan_Lukic, Maj 28, 2011, 13:46:38 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: GTA rp
Detaljan opis problema:
kako da ovo
new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
for(new b = 0; b < sizeof brojevi; b++)
{
new tekst = strlen(text);
for(new i = 0; i<tekst; i++)
{
if(text[i] == brojevi[b])
text[i] = '*' ;
}
}

stavim u /B chat...
e sad sms ocu kad neko posalje poruku da admin moze vidit tu poruku sto je igrac poslo drugom igraca
evo ovako sam radio ali takva ista poruku dode i igracu
if(strcmp(cmd, "/txt", true) == 0 || strcmp(cmd, "/t", true) == 0 || strcmp(cmd, "/sms", true) == 0)
{
   if(IsPlayerConnected(playerid))
{
   if(gPlayerLogged[playerid] == 0)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Niste logirani!");
           return 1;
       }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristite: (/t)ext [phonenumber] [text chat]");
return 1;
}
if(PlayerInfo[playerid][pPnumber] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "  Nemate mobilni telefon...");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s vadi mobilni telefon.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new phonenumb = strval(tmp);
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: (/t)ext [phonenumber] [text chat]");
return 1;
}
if(phonenumb == 555)
{
if ((strcmp("yes", result, true, strlen(result)) == 0) && (strlen(result) == strlen("yes")))
{
SendClientMessage(playerid, COLOR_WHITE, "Tekstualna poruka dostavljena.");
if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "SMS: Nemamo pojma o cemu govorite, Posiljalac: MOLE (555)");
RingTone[playerid] = 20;
return 1;
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "SMS: Jednostavno odradicemo to, Posiljalac: MOLE (555)");
RingTone[playerid] = 20;
return 1;
}
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid;
if(IsPlayerConnected(giveplayerid))
{
   if(giveplayerid != INVALID_PLAYER_ID)
   {
       if(PhoneOnline[giveplayerid] > 0)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Mobilni pretplatnik nije trenutno dostupan,molimo pokusajte kasnije!");
           return 1;
       }
format(string, sizeof(string), "SMS: %s, Posiljalac: %s (%d)", result,sendername,PlayerInfo[playerid][pPnumber]);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[WILDAS]SMS-(Salje:%s | Poruka: %s | Prima: %s)", sendername, result,sendername);
                   SendAdminMessage(COLOR_RED,string);
RingTone[giveplayerid] =20;
SendClientMessage(playerid, COLOR_WHITE, "Tekstualna poruka dostavljena");
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
SendClientMessage(playerid,  COLOR_YELLOW, string);
format(string, sizeof(string), "~r~$-%d", txtcost);
GameTextForPlayer(playerid, string, 5000, 1);
SafeGivePlayerMoney(playerid,-txtcost);
SBizzInfo[2][sbTill] += txtcost;
ExtortionSBiz(2, txtcost);
          PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
          Mobile[playerid] = 255;
return 1;
}
}
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, "  Poruka nije dostavljena...");
}
return 1;
}



EDIT: eo komanda /B
if(strcmp(cmd, "/b", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
       if(gPlayerLogged[playerid] == 0)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Niste logirani !");
           return 1;
       }
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: /b [local ooc chat]");
return 1;
}
if(PlayerInfo[playerid][pMaskuse] == 1)
{
   format(string, sizeof(string), "[OOC]Nepoznat: (( %s ))", result);
}
else
{
format(string, sizeof(string), "[OOC]%s: (( %s ))", sendername, result);
}
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
return 1;
}

Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Maj 29, 2011, 18:21:57 POSLE PODNE od Dude

Ovo staviš ovako for(new j=0;j<MAX_PLAYERS;j++)
{
if(BigEar[j]==1)
{

format(string, sizeof(string), "SMS: %s, Posiljalac: %s (%d)", result,sendername,PlayerInfo[playerid][pPnumber]);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[WILDAS]SMS-(Salje:%s | Poruka: %s | Prima: %s)", sendername, result,sendername);

znaci ispod toga ovako
format(string, sizeof(string), "SMS: %s, Posiljalac: %s (%d)", result,sendername,PlayerInfo[playerid][pPnumber]);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[WILDAS]SMS-(Salje:%s | Poruka: %s | Prima: %s)", sendername, result,sendername);                      
                                        for(new j=0;j<MAX_PLAYERS;j++)
                                                              {
if(BigEar[j]==1)
{
                                                               SendAdminMessage(COLOR_RED,string);
                                                               }
}
                                                               RingTone[giveplayerid] =20;
SendClientMessage(playerid, COLOR_WHITE, "Tekstualna poruka dostavljena");
itd................ nastavak stavi normalno

Samo poravnaj xD meni je otislo.
Poslednja Izmena: Maj 28, 2011, 20:30:45 POSLE PODNE od $--L84S--$

ok......hvala ti za ovo a jel znas mozda kako ono ubaciz u /b da nebude broj 1 neg *

tzo stavis u anticheat kao zabranjene rijeci...isto kao pusikrc i nesta slicno stavis 1,2,3,4,5,6,7,8,9 i on ce ti ispisivat *

koristim junk buster pa onda on napise da je zabtanjeno psovanje itd... bolje mi je ovako..
Poslednja Izmena: Maj 29, 2011, 13:02:41 POSLE PODNE od [CH]Ivan_Lukic