Posts: 2,041
Threads: 97
Joined: Jun 2013
Creo que es asн:
pawn Код:
stock AdminMensaje(color, const string[])
{
foreach(new i: Player)
{
if(Informacion[i][Admin] >= 1)
{
SendClientMessage(i, color, string);
}
}
return false;
}
Posts: 4,930
Threads: 467
Joined: Dec 2010
20.01.2014, 01:15
(
Последний раз редактировалось OTACON; 20.01.2014 в 01:37.
Причина: me confundi de comando :P
)
pawn Код:
COMMAND:a(playerid, params[]){
new name[24],data[128];
GetPlayerName(playerid, name, sizeof(name));
format(data,sizeof(data),"[Admin Chat] %s: %s",name,params[0]);
MensajeAdministradores(-1,data);
return true;
}
///para administradores a administradores
stock MensajeAdministradores(color,const texto[]){
for(new player, user = GetMaxPlayers(); player != user; player++) {
if(IsPlayerConnected(player) && Informacion[player][Admin] >=1){
SendClientMessage(player,color,texto);
}
}
}
//para administradores a jugadores
stock AdministradoresMensaje(playerid,color,const texto[]){
SendClientMessage(playerid,color,texto);
for(new player, user = GetMaxPlayers(); player != user; player++) {
if(IsPlayerConnected(player) && (player!=playerid) && Informacion[playerid][Admin] >=1){
SendClientMessage(player,color,texto);
}
}
}
Posts: 2,041
Threads: 97
Joined: Jun 2013
Quote:
Originally Posted by OTACON
pawn Код:
COMMAND:a(playerid, params[]){ new name[24],data[128]; GetPlayerName(playerid, name, sizeof(name)); format(data,sizeof(data),"[Admin Chat] %s: %s",name,params[0]); MensajeAdministradores(playerid,-1,data); return true; }
stock MensajeAdministradores(playerid,color,const texto[]){ for(new player, user = GetMaxPlayers(); player != user; player++) { if(IsPlayerConnected(player) && Informacion[player][Admin] >=1){ //comprueba si esta conectado el jugador y si es un administrador desde el nivel 1 para arriba SendClientMessage(player,color,texto); } } }
|
.
Darнa error... ...tъ ya sabes cual. Ademбs 'params[0]' no servirнa en este caso.
Posts: 4,930
Threads: 467
Joined: Dec 2010
Posts: 2,041
Threads: 97
Joined: Jun 2013
Quote:
Originally Posted by OTACON
o_O? ... error daria.
|
....
pawn Код:
D:\Rockstar Games\SA-MP San Andreas\....(lнnea) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.