04.04.2011, 11:10
Im trying to learn how to loop and stuff like that. And i can't get this to work!
Ingame it just says "** Disconnected/Nothing Won! **" and spams it.
pawn Код:
stock GetName( playerid )
{
new Name[ MAX_PLAYER_NAME ];
if( IsPlayerConnected( playerid ) )
{
GetPlayerName( playerid, Name, sizeof( Name ) );
}
else
{
Name = "Disconnected/Nothing";
}
return Name;
}
pawn Код:
forward GAPoint( playerid );
public GAPoint( playerid )
{
new string[ 128 ];
for(new i = 0; i < MAX_PLAYERS; i++)
{
format( string, sizeof( string ), "** %s Won! **", GetName( i ) );
SendClientMessageToAll(YELLOW, string);
}
}

