01.04.2013, 21:43
Estaba mal йsto:
Y el comando /a igual estб mal, porque en los SendClientMessage no puedes usar %s, %d, etc.
pawn Код:
public OnPlayerConnect(playerid)
{
SendDeathMessage(INVALID_PLAYER_ID, playerid, 200);
SendClientMessageToAll(yellow, "Se ha conectado %s");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(IsPlayerAdmin(playerid))
{
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
SendClientMessageToAll(red, "%s se ha desconectado");
}
else
{
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
}
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
SendDeathMessage(INVALID_PLAYER_ID, playerid, 200);
format(string, sizeof(string), "Se ha conectado: %s", name);
SendClientMessageToAll(yellow, string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(IsPlayerAdmin(playerid))
{
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
format(string, sizeof(string), "%s se ha desconectado", name);
SendClientMessageToAll(red, string);
}
else
{
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
}
return 1;
}