[Pomoc] brojevi u zcmd

Započeo [GU:RP] Ivica, Decembar 06, 2012, 23:54:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:cyber
Detaljan opis problema:kako u neku zcmd komandu stavit da kad igrac pise broj da dode ona *
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):


jesam ali mi izbacuje ovo result ili text kao da je undefine a nezz u zcmd stavit radi mi strcmp ili sta vec i oke i napravim zcmd i ubacim i nece

for(new r = 0; r < sizeof brojevi; r++)
{
    new text[128];
new tekst = strlen(text);
for(new i = 0; i<tekst; i++)
{
if(text[i] == brojevi[r])
text[i] = '*' ;
}
}


tako sam i stavio za /b /s i radi i stavim za /r i nece da radi?

stavi na vrh skripte odredjene brojeve , i onda stavi proveru pod tu komandu

ali kako mi radi za /s i /b u zcmd a nece u zcmd na /r

napravi ovako, na vrh new Brojevi[][] = {
"1", "2", "3", "4", "5", "6", "7", "8", "9","10"
};
i onda na kraj komande stavis for(new i; i < sizeof(Brojevi); i++)
{
if(strfind(result, Brojevi[i], true) != -1)
{
new strMy[256];
format(strMy, sizeof(strMy), "ANTICHEAT:[%d][%s](%s) !",playerid,sendername,result);
SendAdminMessage(-1, strMy);
}
}

CMD:r(playerid, params[])
{
    if(!IsACop(playerid)) return SCM(playerid, GRAD2, "** Vi niste dio organizacije!");
new clan = PlayerInfo[playerid][Clan], lider = PlayerInfo[playerid][Lider];
if(clan == 1 || clan == 2 || clan == 3 || clan == 4 || clan == 7 || lider == 1 || lider == 2 || lider == 3 || lider == 4 || lider == 7)
{
    new poruka[128], hIme[MAX_PLAYER_NAME];
    if(sscanf(params, "s[128]", poruka)) return SCM(playerid, GRAD3, "{FFAF00}Koristite: {FFFFFF}/r [Text]");
if(PlayerInfo[playerid][pMuted] != 0) return SCMF(playerid, ZUTA, "G-Protect | Vi ste utisani! | Utisani ste jos na: %s", KonvertujVreme(PlayerInfo[playerid][pMuted]));
//if(PlayerInfo[playerid][Zatvoren] != 0) return SCM(playerid, COLOR_NICERED, "G-Protect | {FFFFFF}Zatvoreni ste, ne mozete ovo koristiti!");
for(new i; i < sizeof(ZabranjeneReci); i++)
{
if(strfind(poruka, ZabranjeneReci[i], true) != -1)
{
  new strMy[128];
new STRname[MAX_PLAYER_NAME];
  RPIme(playerid, STRname);
  format(strMy, sizeof(strMy), "[!!!] %s(ID: %d): %s",STRname,playerid,poruka);
    PorukaAdminima(0x586433FF, strMy, 1);
}
}
for(new i; i < strlen(poruka); i++)
{
    if(!strcmp(poruka[i], "{")) poruka[i] = '[';
    if(!strcmp(poruka[i], "}")) poruka[i] = ']';
}
RPIme(playerid, hIme);
    new string[128];
    if(clan == 1 && lider == 0)
{
if(PlayerInfo[playerid][pSex] == 1)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "(radio)PD.Direktor %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "(radio)PD.Zamjenik %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "(radio)PD.Kapetan %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "(radio)PD.Tajni Agent %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "(radio)PD.Policajac %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "(radio)PD.Kadet %s: {FFFFFF}%s, prijem.", hIme, poruka); }
}
SendRadioMessage(1, MojaBoja, string);
}
else if(clan == 2 && lider == 0)
{
    if(PlayerInfo[playerid][pSex] == 1)
    {
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "(radio)FBI.Direktor %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "(radio)FBI.Zamijenik  %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "(radio)FBI.Cobra %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "(radio)FBI.Specialni Agent %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "(radio)FBI.Presretac %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "(radio)FBI.Agent %s: {FFFFFF}%s, prijem.", hIme, poruka); }
}
SendRadioMessage(2, MojaBoja, string);
}
else if(clan == 16 && lider == 0)
{
    if(PlayerInfo[playerid][pSex] == 1)
    {
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "(radio)SWAT.General %s: {FFFFFF}%s,prijem", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "(radio)SWAT.Pukovnik %s: {FFFFFF}%s,prijem", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "(radio)SWAT.Kapetan %s: {FFFFFF}%s,prijem ", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "(radio)SWAT.Tajni Agent %s: {FFFFFF}%s,prijem", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "(radio)SWAT.Casnik %s: {FFFFFF}%s,prijem", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "(radio)SWAT.Vojnik %s: {FFFFFF}%s,prijem", hIme, poruka); }
}
SendRadioMessage(16, MojaBoja, string);
}
    else if(clan == 4 && lider == 0)
{
    if(PlayerInfo[playerid][pSex] == 1)
    {
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "(radio)MD.Upravitelj %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "(radio)MD.Zamjenik %s: {FFFFFF}%s., prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "(radio)MD.Specijalni Kirurg %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "(radio)MD.Kirurg %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "(radio)MD.Doktor %s: {FFFFFF}%s. prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "(radio)MD.Student %s: {FFFFFF}%s, prijem.", hIme, poruka); }
}
SendRadioMessage(4, MojaBoja, string);
}
else if(clan == 7 && lider == 0)
{
    if(PlayerInfo[playerid][pSex] == 1)
    {
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "(radio)M.Gradonacelnik %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "(radio)M.Zamjenik %s: {FFFFFF}%s., prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "(radio)M.Ministar %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "(radio)M.Politicar %s: {FFFFFF}%s, prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "(radio)M.Vozac %s: {FFFFFF}%s. prijem.", hIme, poruka); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "(radio)M.Prigovornik %s: {FFFFFF}%s, prijem.", hIme, poruka); }
}
SendRadioMessage(7, MojaBoja, string);
}
if(lider == 1)
{
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof string, "(radio)PD.Direktor %s: {FFFFFF}%s, prijem.", hIme, poruka); SendRadioMessage(1, MojaBoja, string); }
//else if(PI[playerid][Pol] == 1) { format(CmdString, sizeof CmdString, "(radio) (PD).Direktorica %s: {FFFFFF}%s, prijem.", hIme, poruka); RadioPoruka(1, RADIO_BOJA, CmdString); }
}
if(lider == 2)
{
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof string, "(radio)FBI.Direktor %s: {FFFFFF}%s, prijem.", hIme, poruka); SendRadioMessage(2, MojaBoja, string); }
//else if(PI[playerid][Pol] == 1) { format(CmdString, sizeof CmdString, "(radio) (FBI).Direktorica %s: {FFFFFF}%s, prijem.", hIme, poruka); RadioPoruka(2, RADIO_BOJA, CmdString); }
}
if(lider == 16)
{
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof string, "(radio)SWAT.General %s: {FFFFFF}%s, prijem.", hIme, poruka); SendRadioMessage(16, MojaBoja, string); }
//else if(PI[playerid][Pol] == 1) { format(CmdString, sizeof CmdString, "(radio) (SWAT).Pukovnica %s: {FFFFFF}%s, prijem.", hIme, poruka); RadioPoruka(3, RADIO_BOJA, CmdString); }
}
if(lider == 4)
{
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof string, "(radio)MD.Upravitelj %s: {FFFFFF}%s, prijem.", hIme, poruka); SendRadioMessage(4, MojaBoja, string); }
//else if(PI[playerid][Pol] == 1) { format(CmdString, sizeof CmdString, "(radio) (MD).Direktorica %s: {FFFFFF}%s, prijem.", hIme, poruka); RadioPoruka(4, RADIO_BOJA, CmdString); }
}
if(lider == 7)
{
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof string, "(radio)M.Gradonacelnik %s: {FFFFFF}%s, prijem.", hIme, poruka); SendRadioMessage(7, MojaBoja, string); }
//else if(PI[playerid][Pol] == 1) { format(CmdString, sizeof CmdString, "(radio) (M).Gradonacelnica %s: {FFFFFF}%s, prijem.", hIme, poruka); RadioPoruka(7, RADIO_BOJA, CmdString); }
}
}
for(new i; i < sizeof(Brojevi); i++)
{
if(strfind(result, Brojevi[i], true) != -1)
{
new strMy[256];
format(strMy, sizeof(strMy), "ANTICHEAT:[%d][%s](%s) !",playerid,sendername,result);
PorukaAdminima(-1, strMy, 1);
}
}
return 1;
}


ovako ?



a ovako dali radi, znaci ne znam sta ti radis sa tom skriptom new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
for(new b = 0; b < sizeof brojevi; b++)
{
new tekst = strlen(result);
for(new i = 0; i<tekst; i++)
{
if(result[i] == brojevi[b])
result[i] = '*' ;
}
}
}

tako mi radi u /b /s /w kad se pise na t ali mi tako nece na radio i /d :P

u komandi radio imas vise chatova, tako da ispod svakog chata za organiazcije dodas po 1, da bi ti radilo