SA-MP Forums Archive
giveallscore - Page 2 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Română/Romanian (https://sampforum.blast.hk/forumdisplay.php?fid=40)
+---- Thread: giveallscore - Page 2 (/showthread.php?tid=142199)



Re: giveallscore - r2mv - 17.04.2010

rezolvat


Re: giveallscore - Farsek - 17.04.2010

...fara sa-mi dai comanda:
pawn Code:
if(strcmp(cmd,"/giveallscore",true)==0)
{
new tmp[256];
tmp=strtok(cmdtext,idx);
if(strlen(tmp) ==0||!isNumeric(tmp))return SendClientMessage(playerid,COLOR_RED,"Foloseste:/giveallscore [scor]");
for(new i;i<GetMaxPlayers();i++)
{
new scorstr[256];
format(scorstr,256,"/givescore %d %d",i,tmp);
OnPlayerCommandText(playerid,scorstr);
}
return 1;
}
Desigur ca o sa fie un mic flood pe server


Re: giveallscore - r2mv - 17.04.2010

rezolvat


Re: giveallscore - Zh3r0 - 17.04.2010

Quote:
Originally Posted by Farse.
...fara sa-mi dai comanda:
pawn Code:
if(strcmp(cmd,"/giveallscore",true)==0)
{
new tmp[256];
tmp=strtok(cmdtext,idx);
if(strlen(tmp) ==0||!isNumeric(tmp))return SendClientMessage(playerid,COLOR_RED,"Foloseste:/giveallscore [scor]");
for(new i;i<GetMaxPlayers();i++)
{
new scorstr[256];
format(scorstr,256,"/givescore %d %d",i,tmp);
OnPlayerCommandText(playerid,scorstr);
}
return 1;
}
Desigur ca o sa fie un mic flood pe server
El crede ca e folosita de toti. Nu numai de admini, cred?


Re: giveallscore - r2mv - 17.04.2010

rezolvat


Re: giveallscore - Farsek - 17.04.2010

la mic flood ma refer in chat,pentru ca daca folosesti /givescore trimite un mesaj in chat,si ai 10 playeri se trimite de 10 ori acelasi mesaj ,pe fiecare id..daca vrei sa nu fie flood,dai numai pentru un player mesaj ,gen"Administrator %s ti-a schimbat scorul in %d"


Re: giveallscore - r2mv - 17.04.2010

rezolvat


Re: giveallscore - r2mv - 17.04.2010

rezolvat


Re: giveallscore - Farsek - 17.04.2010

Vina mea..
pawn Code:
if(strcmp(cmd,"/giveallscore",true)==0)
{
new tmp[256];
tmp=strtok(cmdtext,idx);
if(strlen(tmp) ==0||!isNumeric(tmp))return SendClientMessage(playerid,COLOR_RED,"Foloseste:/giveallscore [scor]");
for(new i;i<GetMaxPlayers();i++)
{
new scorstr[256];
format(scorstr,256,"/givescore %d %d",i,strval(tmp));///strval :-"
OnPlayerCommandText(playerid,scorstr);
}
return 1;
}
Nu stiu ce adminscript ai tu,dami comanda /givescore si iti fac /giveallscore..
PSuteai sa dai un edit..


Re: giveallscore - r2mv - 17.04.2010

rezolvat


giveallscore - [NoV]LaZ - 17.04.2010

https://sampwiki.blast.hk/wiki/OnPlayerCommandText
https://sampwiki.blast.hk/wiki/Strtok
https://sampwiki.blast.hk/wiki/Loop
https://sampwiki.blast.hk/wiki/SetPlayerScore
https://sampwiki.blast.hk/wiki/SendClientMessageToAll

Fara doublu post, te rog. Citeste regulile.
________
BELLADONNA SHEMALE


Re: giveallscore - r2mv - 17.04.2010

rezolvat


Re: giveallscore - Farsek - 18.04.2010

La OnPlayerCommandText:
dcmd(giveallscore,12,cmdtext);

//inainte de "dcmd_setscore" pui asta:
pawn Code:
dcmd_giveallscore(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 4) {
      new tmp[256], Index; tmp = strtok(params,Index);
      if(!strlen(tmp) || !IsNumeric(tmp)) return SendClientMessage(playerid, red, "USAGE: /giveallscore [score]");
        new score = strval(tmp), string[128];
        CMDMessageToAdmins(playerid,"giveallscore");
        for(new i;i<GetMaxPlayers();i++)
        {
        SetPlayerScore(i,GetPlayerScore(i)+score);
        }
        format(string,128,"Administratorul %s va dat la toti %d score...",pName(playerid),score);
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    return 1;
}



Re: giveallscore - r2mv - 18.04.2010

rezolvat


Re: giveallscore - Farsek - 18.04.2010

ma tu daca nu explici bine de la inceput,de unde vrei sa stiu ce pl vrei.
Deci tu vrei ca comanda sa fie pentru orice?
Numai adminii sa o foloseasca?
Sa setezi tu cat scor sa ii dea?
Sa dea 50 cum ai dat prin PM?
Zi ma ca nu te doare'n buca,ca asa facem spam aici pana in 2012 si tot nu inteleg ce vrei sa fac cu "giveallscore"
_________________________________________________C omanda de mai sus merge


Re: giveallscore - r2mv - 18.04.2010

rezolvat


Re: giveallscore - Razvann - 18.04.2010

Quote:
Originally Posted by r2mv
deci io vreau sa am comanda giveallscore sa pot sa la dau la toti scor.Am cautat pe diverse forumuri si in diverse gm si nu am gasit o comanda givescore unde sa setezi tu cat scor sa dai. De exemplu givescore id5 100.AM gasit doar givescore id5 la care sa ii dea 50 scor sau cat ai setat tu cand ai dat compile.Daca poti sa faci rost de o comanda giiveallscore [scorul] e foarte bine, daca nu sa o modifici pe a mea din givescore id in giveallscore. Poti sa imi dai add la ymessenger si sa intrii la mn in pc cu team viewer
http://pastebin.com/ny1NAMxQ


Re: giveallscore - Farsek - 19.04.2010

MA SUFOCI PSIHIC
pawn Code:
dcmd_giveallscore(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 4) {
      new tmp[256], Index; tmp = strtok(params,Index);
      if(!strlen(tmp) || !IsNumeric(tmp)) return SendClientMessage(playerid, red, "USAGE: /giveallscore [score]");
        new score = strval(tmp), string[128];
        CMDMessageToAdmins(playerid,"giveallscore");
        for(new i;i<GetMaxPlayers();i++)
        {
        SetPlayerScore(i,GetPlayerScore(i)+score);
        }
        format(string,128,"Administratorul %s va dat la toti %d score...",pName(playerid),score);
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    return 1;
}
uite comanda ma,dai la toti ce scor vrei tu,tam dat'o de acu 10 posturi,esti chiar sau ce pwla ma ca ma ia cu nervi,dai /giveallscore scor si da la TOTI SCOR,CE E ASA DE GREU MA?DOAR PUI IN LADMIN si GATA x(((((((((((((((((((((((((((((((((((((((((((((((99 9999


Re: giveallscore - r2mv - 20.04.2010

rezolvat


giveallscore - [NoV]LaZ - 20.04.2010

https://sampwiki.blast.hk/wiki/Dcmd
________
ZOLOFT LAWSUIT INFO