10.05.2012, 23:55
Iae pessoas.
Vim pedir ajuda porque estou tentando fazer зa onda aqui e nгo to conseguindo tirar esses erros:
Й uma lista com os 5 mais ricos do servidor
LOOOL esqueci dos erros ta ae:
Linha:
No OnPlayerConnect, isso que nгo intendi '-'
Vim pedir ajuda porque estou tentando fazer зa onda aqui e nгo to conseguindo tirar esses erros:
Й uma lista com os 5 mais ricos do servidor
pawn Код:
if (strcmp("/ricos", cmdtext, true, 10) == 0)
{
new string[128], Slot1 = -1, Slot2 = -1, Slot3 = -1, Slot4 = -1, HighestCash = -9999;
SendClientMessage(playerid,BRANCO_EDU,"Lista de Ricos:");
for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x)) if (GetPlayerMoney(x) >= HighestCash) {
HighestCash = GetPlayerMoney(x);
Slot1 = x;
}
HighestCash = -9999;
for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != Slot1) if (GetPlayerMoney(x) >= HighestCash) {
HighestCash = GetPlayerMoney(x);
Slot2 = x;
}
HighestCash = -9999;
for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != Slot1 && x != Slot2) if (GetPlayerMoney(x) >= HighestCash) {
HighestCash = GetPlayerMoney(x);
Slot3 = x;
}
HighestCash = -9999;
for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != Slot1 && x != Slot2 && x != Slot3) if (GetPlayerMoney(x) >= HighestCash) {
HighestCash = GetPlayerMoney(x);
Slot4 = x;
}
format(string, sizeof(string), "(%d) %s - $%d", Slot1,PlayerName2(Slot1),GetPlayerMoney(Slot1) );
SendClientMessage(playerid,BRANCO_EDU,string);
if(Slot2 != -1) {
format(string, sizeof(string), "(%d) %s - $%d", Slot2,PlayerName2(Slot2),GetPlayerMoney(Slot2) );
SendClientMessage(playerid,BRANCO_EDU,string);
}
if(Slot3 != -1) {
format(string, sizeof(string), "(%d) %s - $%d", Slot3,PlayerName2(Slot3),GetPlayerMoney(Slot3) );
SendClientMessage(playerid,BRANCO_EDU,string);
}
if(Slot4 != -1) {
format(string, sizeof(string), "(%d) %s - $%d", Slot4,PlayerName2(Slot4),GetPlayerMoney(Slot4) );
SendClientMessage(playerid,BRANCO_EDU,string);
}
return 1;
}
LOOOL esqueci dos erros ta ae:
pawn Код:
C:\Documents and Settings\Eduardo\Desktop\[__EdUaRdO__]\GTA\Evolution Killers\gamemodes\GM.pwn(8455) : error 017: undefined symbol "PlayerName2"
C:\Documents and Settings\Eduardo\Desktop\[__EdUaRdO__]\GTA\Evolution Killers\gamemodes\GM.pwn(8455) : error 017: undefined symbol "PlayerName2"
C:\Documents and Settings\Eduardo\Desktop\[__EdUaRdO__]\GTA\Evolution Killers\gamemodes\GM.pwn(8455) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Eduardo\Desktop\[__EdUaRdO__]\GTA\Evolution Killers\gamemodes\GM.pwn(8455) : fatal error 107: too many error messages on one line
Quote:
GetPlayerName(playerid, PlayerName2, sizeof(PlayerName2)); |