17.04.2010, 15:49
rezolvat
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;
}
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,strval(tmp));///strval :-"
OnPlayerCommandText(playerid,scorstr);
}
return 1;
}
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;
}
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
|
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;
}