ocmd:givemoneyall(playerid,params[])
{
//if(adminabfrage)
{
new betrag,string[128];
if(sscanf(params,"i",betrag))return SendClientMessage(playerid,0xFF0000FF,"Fehler: /givemoneyall [Betrag]");
{
format(string,sizeof(string),"Admin %s gibt jedem Spieler %i€!",PlayerName(playerid),betrag);
SendClientMessageToAll(0xFF0000FF,string);
for (new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
GivePlayerMoney(i,betrag);
}
}
}
}
return 1;
}
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
einfach das format und SendClient... ausserhalb der Schleife lassen