[Pomoc] Strcmp u CMD

9. Apr. 2013. Zaključano
414
pregleda
9
postova
Robi031
4
Enforcer
9. Apr. 2013.
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;
    new aname;
    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);
      SendClientMessage(playerid, 0xFFFFFFFF, string);
      format(string,sizeof(string), "- Deaths: %i", PlayerInfo);
      SendClientMessage(playerid, 0xFFFFFFFF, string);
      format(string,sizeof(string), "- Admin Level: %i", PlayerInfo);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |");
    return 1;

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Blaeks_Biofor
5
Forum Don
9. Apr. 2013.
CMD:stats(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |");
    new string;
    new aname;
    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);
      SendClientMessage(playerid, 0xFFFFFFFF, string);
      format(string,sizeof(string), "- Deaths: %i", PlayerInfo);
      SendClientMessage(playerid, 0xFFFFFFFF, string);
      format(string,sizeof(string), "- Admin Level: %i", PlayerInfo);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |");
    return 1;
}
Robi031
4
Enforcer
9. Apr. 2013.
Hvala care,Ides potpis!🙂
i da,Da neotvaram novu temu mozes mi tu dati za kick i za ban
Blaeks_Biofor
5
Forum Don
9. Apr. 2013.
pa ako koristis sscanf, to je nesto tipa ovog
CMD:kick(playerid, params[])
{
new id, razlog, string;
if(PlayerInfo < 1)return SCM(playerid,-1,"Nisi ovlascen");
        if(sscanf(params, "us", id, razlog))return SCM(playerid,-1, "/kick [ime/ID] ");
if(!IsPlayerConnected(id))  return SCM(playerid, -1, "Igrac je offline !");
Kick(id);
return 1;
}
Robi031
4
Enforcer
9. Apr. 2013.
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
CkusaColeCM
4
Shot Caller
9. Apr. 2013.
da imena pisu %s ti je za imena %d ti je za brojeve 😉
Robi031
4
Enforcer
9. Apr. 2013.
e to care ty
CkusaColeCM
4
Shot Caller
9. Apr. 2013.
Nista 😄
Blaeks_Biofor
5
Forum Don
9. Apr. 2013.
problem resen, lock

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha