Wysłany: 2015-11-23, 09:04
PolskiPolaczek
Pawner[SAMP]
Wiek: 27 Na forum: 3942 dni Posty: 32
Nick w MP: PolskiPolaczek
Piwa : 122
Witam mam pewien problem z komend? na dawanie score wszystkim graczom poniewa? gdy dam np wszystkim po 100 score to graczom ustawia si? 2 razy tyle ile da? admin + score tego admina kt?ry dawa? score.
Oto kod
Kod: CMD:dajscoreall(playerid, cmdtext[])
{
if(Gracz[playerid][Ranga] >= 5)
{
new score;
if(sscanf(cmdtext, "d", score))
{
SendClientMessage(playerid, -1, "Wpisz: /dajscoreall [score]");
return 1;
}
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerScore(i, GetPlayerScore(playerid)+score);
}
}
new string[50];
format(string, sizeof(string), "AS: Da?e? %d puntkt?w wszytkim graczom",score);
SendClientMessage(playerid, ZIELONY, string);
format(string, sizeof(string), "Admin %s da? wszystkim %d punktow",PlayerName(playerid),score);
SendClientMessageToAll(ZIELONY, string);
}
return 1;
}
Prosz? o pomoc
Wysłany: 2015-11-23, 09:22
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
Kod: CMD:dajscoreall(playerid, cmdtext[])
{
if(Gracz[playerid][Ranga] >= 5)
{
new score;
if(sscanf(cmdtext, "d", score))
{
SendClientMessage(playerid, -1, "Wpisz: /dajscoreall [score]");
return 1;
}
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerScore(i, GetPlayerScore(i)+score);
}
}
new string[50];
format(string, sizeof(string), "AS: Da?e? %d puntkt?w wszytkim graczom",score);
SendClientMessage(playerid, ZIELONY, string);
format(string, sizeof(string), "Admin %s da? wszystkim %d punktow",PlayerName(playerid),score);
SendClientMessageToAll(ZIELONY, string);
}
return 1;
}
zobacz tak
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Wysłany: 2015-11-23, 10:23
PolskiPolaczek
Pawner[SAMP]
Wiek: 27 Na forum: 3942 dni Posty: 32
Nick w MP: PolskiPolaczek
Piwa : 122
Dzi?ki wszystko pi?knie dzia?a leci Piwko i respekt temat mo?na przenie??.
Tagi: komenda :: score :: all
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: