09.09.2013, 21:31
Bem quero colocar esse comando /amudarnick , sу para eu utilizar, podem me ajudar?
Obrigado desde jб.
Obrigado desde jб.
if (PlayerInfo[playerid][pAdmin] >= 1339) //sу colocar de acordo com seu gamemode, eo nivel de admin q vc queria q use esse comando :)
Mande o comando /amudarnick
Dentro de [*pawn] Cуdigo AKI [*/pawn] ( Sem os * ) |
if(strcmp(cmd,"/amudarnick",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /amudarnick [ id ]");
return true;
}
new playa;
playa = ReturnUser(tmp);
GetPlayerName(playerid, sendername, 256);
if (PlayerInfo[playerid][pAdmin] >= MASTER)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
MudarNickAceito[playa] = 1;
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
//format(string, sizeof(string), "Vocк autorizou %s a mudar o nick.", giveplayer);
//SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Admin %s: Autorizou vocк a mudar o nick, digite /mudarnick.", sendername);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "ADMIN CMD: %s autorizou %s a mudar o nick !",sendername,giveplayer);
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando!");
return true;
}
}
return true;
}
if (PlayerInfo[playerid][pAdmin] >= MASTER)
if(strcmp(cmd,"/amudarnick",true)==0) {
new yNome [ 21 ] ;
if(IsPlayerConnected(playerid)) {
GetPlayerName ( playerid, yNome, 21 ) ;
if ( !strcmp(yNome, "tristtok", true))
return SendClientMessage ( playerid, -1, "[ ERRO ]: Vocк nгo tem autorizaзгo" ) ;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GRAD2, "USE: /amudarnick [ id ]");
new playa;
playa = ReturnUser(tmp);
GetPlayerName(playerid, sendername, 256);
if(IsPlayerConnected(playa)) {
if(playa != INVALID_PLAYER_ID) {
MudarNickAceito[playa] = 1;
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
//format(string, sizeof(string), "Vocк autorizou %s a mudar o nick.", giveplayer);
//SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Admin %s: Autorizou vocк a mudar o nick, digite /mudarnick.", sendername);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "ADMIN CMD: %s autorizou %s a mudar o nick !",sendername,giveplayer);
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
return true;
}
GetPlayerName(playerid, sendername, 256);
if(strcmp(sendername,"//seu nik aqui",true)==0
Ele sу vai poder usar o comando caso tenha o nick tristtok
pawn Код:
|