22.07.2012, 17:38
pawn Код:
#include a_samp
enum eNick
{
NickO[24],
NickT[24]
};
new BotNick[][eNick] =
{
{"aux", "nome_para_trocar"},
{"con", "nome_para_trocar"}
};
public OnPlayerConnect(playerid)
{
for(new i = 0; i < sizeof BotNick; i++)
{
if(strcmp(GetPlayerNameEx(playerid), BotNick[i][NickO], true, strlen(BotNick[i][NickO]) ) == 0)
{
SetPlayerName(playerid, BotNick[i][NickT]);
break;
}
}
return 1;
}
stock GetPlayerNameEx(playerid)
{
new name[24];
GetPlayerName(playerid, name, 24);
return name;
}