27.04.2015, 21:23
(
Последний раз редактировалось Mamoru; 29.04.2015 в 18:23.
Причина: -Solucionado-
)
Hola, como puedo agregarle a esta funciуn (NombreJ(playerid)) que si el jugador tiene la variable Desconocido[playerid]=1; en vez de salir el nombre salga "Desconocido" y seguido el texto del mensaje donde se uso el NombreJ(playerid)
Es para no tener que hacer esto en todos los comandos:
Funciуn:
Es para no tener que hacer esto en todos los comandos:
pawn Код:
switch(Desconocido[playerid])
{
case 0:format(string, sizeof(string), "* %s compra un arma.",NombreJ(playerid));
case 1:format(string, sizeof(string), "* Desconocido compra un arma.");
}
ProxDetector(20.0, playerid, string, -1, -1, -1, -1, -1);
Funciуn:
pawn Код:
stock NombreJ(playerid)
{
new NombrePJ[24], N[24];
GetPlayerName(playerid, NombrePJ, 24);
strmid(N, NombrePJ, 0, strlen(NombrePJ), 24);
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if (N[i] == '_') N[i] = ' ';
}
return N;
}