11.11.2013, 16:11
Criei isso aqui, mas na frente do nome do player, sу mostra o id 0, sendo que meu id й outro, o que tem de errado?
PHP код:
COMMAND:participantes(playerid, params[])
{
// Setup local variables
new Name[24], MemberList[2000], Convoy;
// Send the command to all admins so they can see it
SendAdminText(playerid, "/participantes", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the member is in a convoy
if (APlayerData[playerid][InConvoy] == true)
{
// Get the convoyID of the member
Convoy = APlayerData[playerid][ConvoyID];
// Loop through all members
for (new i; i < CONVOY_MAX_MEMBERS; i++)
{
// Check if this player is connected
if (IsPlayerConnected(i))
{
if (AConvoys[Convoy][Members][i] != -1) // Check if this member-spot is occupied
{
// Get the name of the member
GetPlayerName(AConvoys[Convoy][Members][i], Name, sizeof(Name));
// Add the membernames to the list
format(MemberList, 2000, "%s%s (ID: %i)\n", MemberList, Name, i);
}
}
ShowPlayerDialog(playerid, DialogConvoyMembers, DIALOG_STYLE_MSGBOX, "Membros do comboio", MemberList, "OK", "");
}
}
else
SendClientMessage(playerid, 0xFF0000FF, "Nгo йs do comboio.");
}
else
return 0;
return 1;
}