[Pedido] Comando - 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: [Pedido] Comando (
/showthread.php?tid=399544)
Comando -
jdsfenix - 15.12.2012
Resolvidooo Vlw Danny
-
[S]Kimimaro - 15.12.2012
....
Re: Comando -
[Dark]Danny_Uchiha - 15.12.2012
fis um aqui mano no meu gm deu certo ve ai no seu
pawn Код:
COMMAND:darskin(playerid, params[])
{
new Msg[158], Skinid, id, nome[MAX_PLAYER_NAME], admnome[MAX_PLAYER_NAME], msg[158];
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 0)
{
if (sscanf(params, "ui",id, Skinid)) SendClientMessage(playerid, 0xFF0000AA, "Use: /darskin [playerid] [id(0-299)]");
else
{
if ((Skinid >= 0) && (Skinid <= 299))
{
GetPlayerName(playerid,admnome,sizeof(admnome));
GetPlayerName(id,nome,sizeof(nome));
SetPlayerSkin(playerid, Skinid);
format(Msg, 158, "Vocк mudou a skin do %s para %i", nome, Skinid);
SendClientMessage(playerid, 0x00FF00, Msg);
format(msg, 158, "O Adm: %s Mudou sua skin para %i", admnome, Skinid);
SendClientMessage(id, 0x00FF00, msg);
}
else
SendClientMessage(playerid, 0xFF0000, "id da skin invalida ids: 0-299");
}
return 1;
}
@EDIT:talves de alguns loose indentation dai tente desse jeito
pawn Код:
COMMAND:darskin(playerid, params[])
{
new Msg[158], Skinid, id, nome[MAX_PLAYER_NAME], admnome[MAX_PLAYER_NAME], msg[158];
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 0)
{
if (sscanf(params, "ui",id, Skinid)) SendClientMessage(playerid, 0xFF0000AA, "Use: /darskin [playerid] [id(0-299)]");
else
{
if ((Skinid >= 0) && (Skinid <= 299))
{
SetPlayerSkin(playerid, Skinid);
format(Msg, 158, "Vocк mudou a skin do %s para %i", nome, Skinid);
SendClientMessage(playerid, 0x00FF00, Msg);
format(msg, 158, "O Adm: %s Mudou sua skin para %i", admnome, Skinid);
SendClientMessage(id, 0x00FF00, msg);
}
else
SendClientMessage(playerid, 0xFF0000, "id da skin invalida ids: 0-299");
}
}
else
return 0;
}
else
return 0;
return 1;
}
Re: Comando -
jdsfenix - 15.12.2012
Danny deu Conflito com o /setskin
pawn Код:
C:\Users\cliente\Desktop\GM TESTE\pawno\include\PPC_PlayerCommands.inc(4074) : warning 217: loose indentation
C:\Users\cliente\Desktop\GM TESTE\pawno\include\PPC_PlayerCommands.inc(4074) : error 029: invalid expression, assumed zero
C:\Users\cliente\Desktop\GM TESTE\pawno\include\PPC_PlayerCommands.inc(4074) : error 017: undefined symbol "cmd_setskin"
C:\Users\cliente\Desktop\GM TESTE\pawno\include\PPC_PlayerCommands.inc(4074) : error 029: invalid expression, assumed zero
C:\Users\cliente\Desktop\GM TESTE\pawno\include\PPC_PlayerCommands.inc(4074) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Re: Comando -
TheuziiN_ - 15.12.2012
Код:
if(strcmp(cmd, "/setarskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /setarskin [PlayerID] [SkinID]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "ID desconhecido!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pSkin] = level;
format(string, sizeof(string), "O admin %s mudou sua Skin para %d", sendername,level);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "Vocк mudou a skin do %s para %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
SetPlayerSkin(para1, PlayerInfo[para1][pSkin]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem permissгo para usar esse comando!");
}
}
return 1;
}
Assim?
Re: Comando -
[Dark]Danny_Uchiha - 15.12.2012
eu dei edit la e botei otro comando que faz mesma funзao tenta com akele...
Re: Comando -
jdsfenix - 15.12.2012
o Segundo Pegou Perfeito Sу faltou Ajeitar um anuncio que aparece dizendo que o player que trocou o prorpio skin=)
VLW
RESOLVIDOOOOO