[AJUDA] Pessoas on no servidor - 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: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Pessoas on no servidor (
/showthread.php?tid=295263)
[AJUDA] Pessoas on no servidor -
Aquilis - 05.11.2011
Olб, como й que eu faзo para fazer com que o valor abaixo se multiplique pelo nъmero de pessoas online no servidor?
pawn Код:
CofreOrg[1][COdinheiro] = CofreOrg[1][COdinheiro] + 10 * PlayersOnline;
Re: [AJUDA] Pessoas on no servidor -
AppleX - 05.11.2011
pawn Код:
new playersCount;
for(new i; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i)) ++playersCount
}
CofreOrg[1][COdinheiro] += playersCount * 10;
Re: [AJUDA] Pessoas on no servidor -
Shadoww5 - 05.11.2011
PHP код:
new PlayersOnline;
for(new i, p = GetMaxPlayers(); i < p; i ++)
if(IsPlayerConnected(i))
PlayersOnline++;
Re: [AJUDA] Pessoas on no servidor -
[O.z]Caroline - 05.11.2011
pawn Код:
CofreOrg[1][COdinheiro] = CofreOrg[1][COdinheiro] + 10 * PlayersOnline;
// Final do GM:
stock Coount()
{
new out;
for(new i, e = GetMaxPlayers(); i != e; i++)
{
if(IsPlayerConnected(i)) out++
}
return out;
}
Re: [AJUDA] Pessoas on no servidor -
Aquilis - 05.11.2011
Obrigado deu certo! +rep