[Pomoc] Strcmp u CMD

Započeo |LOB| Robi.pwn, April 09, 2013, 11:45:33 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Moj gm od 0
Detaljan opis problema:Kako da prebacim iz strcmp u CMD?
Dio skripte:
if (strcmp("/stats", cmdtext, true, 5) == 0)
{
    SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |");
    new string[128];
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname,sizeof(aname));
    format(string,sizeof(string), "%s These are your stats:", aname);
     SendClientMessage(playerid, 0xFFFFFFFF,string);
     format(string,sizeof(string), "- Cash: %i", GetPlayerMoney(playerid));
      SendClientMessage(playerid, 0xFFFFFFFF, string);
      format(string,sizeof(string), "- Kills: %i", PlayerInfo[playerid][pKills]);
       SendClientMessage(playerid, 0xFFFFFFFF, string);
       format(string,sizeof(string), "- Deaths: %i", PlayerInfo[playerid][pDeaths]);
       SendClientMessage(playerid, 0xFFFFFFFF, string);
       format(string,sizeof(string), "- Admin Level: %i", PlayerInfo[playerid][pAdmin]);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |");
    return 1;

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Citat: [RS]panameR. poslato Novembar 24, 2012, 13:50:32 POSLE PODNE
Citat: [FG] Tixa Mukic poslato Novembar 24, 2012, 11:12:07 PRE PODNE
Jel mi moze netko objasnit kako popuni i to sve opću uplatnicu :'(
kemijskom

Blaeks RESPECT!
joXy_ BIG RESPECT!
CkusaColeCM RESPECT!
Ivan_Ino.pwn BIG RESPECT!

CMD:stats(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |");
    new string[128];
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname,sizeof(aname));
    format(string,sizeof(string), "%s These are your stats:", aname);
     SendClientMessage(playerid, 0xFFFFFFFF,string);
     format(string,sizeof(string), "- Cash: %i", GetPlayerMoney(playerid));
      SendClientMessage(playerid, 0xFFFFFFFF, string);
      format(string,sizeof(string), "- Kills: %i", PlayerInfo[playerid][pKills]);
       SendClientMessage(playerid, 0xFFFFFFFF, string);
       format(string,sizeof(string), "- Deaths: %i", PlayerInfo[playerid][pDeaths]);
       SendClientMessage(playerid, 0xFFFFFFFF, string);
       format(string,sizeof(string), "- Admin Level: %i", PlayerInfo[playerid][pAdmin]);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |");
    return 1;
}

Hvala care,Ides potpis!:)
i da,Da neotvaram novu temu mozes mi tu dati za kick i za ban
Citat: [RS]panameR. poslato Novembar 24, 2012, 13:50:32 POSLE PODNE
Citat: [FG] Tixa Mukic poslato Novembar 24, 2012, 11:12:07 PRE PODNE
Jel mi moze netko objasnit kako popuni i to sve opću uplatnicu :'(
kemijskom

Blaeks RESPECT!
joXy_ BIG RESPECT!
CkusaColeCM RESPECT!
Ivan_Ino.pwn BIG RESPECT!

pa ako koristis sscanf, to je nesto tipa ovog CMD:kick(playerid, params[])
{
new id, razlog[128], string[128];
if(PlayerInfo[playerid][pAdmin] < 1)return SCM(playerid,-1,"Nisi ovlascen");
        if(sscanf(params, "us[128]", id, razlog))return SCM(playerid,-1, "/kick [ime/ID] [razlog]");
if(!IsPlayerConnected(id))  return SCM(playerid, -1, "Igrac je offline !");
Kick(id);
return 1;
}

jeste to je to a kako da sad napravim send client message to all tj znam to al neznam kako pstavit imena da pišu
Citat: [RS]panameR. poslato Novembar 24, 2012, 13:50:32 POSLE PODNE
Citat: [FG] Tixa Mukic poslato Novembar 24, 2012, 11:12:07 PRE PODNE
Jel mi moze netko objasnit kako popuni i to sve opću uplatnicu :'(
kemijskom

Blaeks RESPECT!
joXy_ BIG RESPECT!
CkusaColeCM RESPECT!
Ivan_Ino.pwn BIG RESPECT!

da imena pisu %s ti je za imena %d ti je za brojeve ;)

Kraden avatar bloomeru :*

e to care ty
Citat: [RS]panameR. poslato Novembar 24, 2012, 13:50:32 POSLE PODNE
Citat: [FG] Tixa Mukic poslato Novembar 24, 2012, 11:12:07 PRE PODNE
Jel mi moze netko objasnit kako popuni i to sve opću uplatnicu :'(
kemijskom

Blaeks RESPECT!
joXy_ BIG RESPECT!
CkusaColeCM RESPECT!
Ivan_Ino.pwn BIG RESPECT!