Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: |LOB| Robi.pwn poslato April 09, 2013, 11:45:33 PRE PODNE

Naslov: [Pomoc] Strcmp u CMD
Poruka od: |LOB| Robi.pwn poslato April 09, 2013, 11:45:33 PRE PODNE
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):
Naslov: Odg: [Pomoc] Strcmp u CMD
Poruka od: Blaeks poslato April 09, 2013, 11:49:43 PRE PODNE
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;
}
Naslov: Odg: [Pomoc] Strcmp u CMD
Poruka od: |LOB| Robi.pwn poslato April 09, 2013, 11:51:02 PRE PODNE
Hvala care,Ides potpis!:)
i da,Da neotvaram novu temu mozes mi tu dati za kick i za ban
Naslov: Odg: [Pomoc] Strcmp u CMD
Poruka od: Blaeks poslato April 09, 2013, 11:56:07 PRE PODNE
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;
}
Naslov: Odg: [Pomoc] Strcmp u CMD
Poruka od: |LOB| Robi.pwn poslato April 09, 2013, 11:58:04 PRE PODNE
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
Naslov: Odg: [Pomoc] Strcmp u CMD
Poruka od: CkusaColeCM poslato April 09, 2013, 12:03:13 POSLE PODNE
da imena pisu %s ti je za imena %d ti je za brojeve ;)
Naslov: Odg: [Pomoc] Strcmp u CMD
Poruka od: |LOB| Robi.pwn poslato April 09, 2013, 12:03:58 POSLE PODNE
e to care ty
Naslov: Odg: [Pomoc] Strcmp u CMD
Poruka od: CkusaColeCM poslato April 09, 2013, 12:56:15 POSLE PODNE
Nista :D
Naslov: Odg: [Pomoc] Strcmp u CMD
Poruka od: Blaeks poslato April 09, 2013, 18:22:32 POSLE PODNE
problem resen, lock