[Ajuda] SetScore
#10

Quote:
Originally Posted by BrGabrielBr
Посмотреть сообщение
PHP код:
Foi certinho +repaproveitando o topico pode me dizer como posso usar este comando й para dar /setscore ai todos que tive se online ia ganhar o score dado pelo admin 
Usa loop,

Ex:

Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
      if(IsPlayerConnected(i))
      {
            SetPlayerScore(i, GetPlayerScore(i) + SCORE);
      }
}
Код:
CMD:setscoretodos(playerid, params[])
{
    new
	String[130],
	SCORE
    ;

    if(sscanf(params, "i", SCORE))
	return SendClientMessage(playerid, -1, "/SetScore [SCORE].");

    if(SCORE < 0 || SCORE > 99999)
	return SendClientMessage(playerid, -1, "Setagem de 0 a 99999.");

    if(Player[playerid][Admin] < 1)
	return SendClientMessage(playerid, -1, "Vocк nгo tem permissгo para usar o comando.");

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
	if(IsPlayerConnected(i))
 	{
   		SetPlayerScore(i, GetPlayerScore(i) + SCORE);
 	}
    }
  	
    format(String, sizeof(String), "O player %s deu %i de score para todos jogadores online.", Nome(playerid), SCORE);
    SendClientMessageToAll(-1, String);
    return true;
}
Reply


Messages In This Thread
SetScore - by BrGabrielBr - 18.03.2018, 23:47
Re: SetScore - by FerrariL - 18.03.2018, 23:53
Re: SetScore - by BrGabrielBr - 18.03.2018, 23:58
Re: SetScore - by PilateGR - 19.03.2018, 00:00
Re: SetScore - by BrGabrielBr - 19.03.2018, 00:09
Re: SetScore - by Lontresca - 19.03.2018, 00:13
Re: SetScore - by PilateGR - 19.03.2018, 00:13
Re: SetScore - by SpikeCompiler - 19.03.2018, 00:17
Re: SetScore - by BrGabrielBr - 19.03.2018, 00:44
Re: SetScore - by PilateGR - 19.03.2018, 01:18

Forum Jump:


Users browsing this thread: 1 Guest(s)