[Ajuda] Ajuda Por Favor!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda Por Favor!! (
/showthread.php?tid=595423)
Ajuda Por Favor!! -
Rollyan - 02.12.2015
Bem estou com um comando aqui queria por ele pra ser usado so com minha pessoa ou seja so com meu nick que e Rollyan
PHP код:
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] >= 1341)
{
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;
}
Re: Ajuda Por Favor!! -
blastdap - 02.12.2015
Nгo precisa por o texto desse tamanho.
wiki.sa-mp.com/wiki/GetPlayerName
wiki.sa-mp.com/wiki/Strcmp
Sу fazer
Re: Ajuda Por Favor!! -
Rollyan - 02.12.2015
Voce poderia responder como ficaria com o codigo pra min?
Re: Ajuda Por Favor!! -
EditPawn - 02.12.2015
Sу adaptar ao seu comando.
PHP код:
new Name[20];
GetPlayerName(playerid, Name, 20);
if(!strcmp(Name, "Rollyan", false)) {} //Se o nome do playerid == "Rollyan"
else {} //Se o nome do playerid != "Rollyan"
Re: Ajuda Por Favor!! -
Rollyan - 03.12.2015
Ta dando erro mano
Код HTML:
(31570) : error 017: undefined symbol "Rollyan"
(31588) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.