[AJUDA] /trocarskin -
Oakley_TwOPaCk - 25.02.2012
Gente , estou atraz desse cmd a muito tempo, nгo vem falar que nгo usei Search pois usei sim SR. e nгo consigo achar nenhum que seja bom, =@
me ajudem por favor ? queria um que vc digitasse - /trocarskin . dai aparecia um dialog pedino pra vc por o id da Sua skin, dai vc colocava e dai apertava [Enter] Dai ia =] , e eu nгo acho nem ferrando isso '-', se alguem souber algum cmd que existe por ai, postem auqi por favor, ou se quizerem fazer um eu agradeзo
.
@Topic
alguuem ? x=
Re: [AJUDA] /trocarskin -
4LiSs0N - 25.02.2012
pawn Код:
if (strcmp(cmd, "/Skin", true) == 0 )
{
new skin[256];
skin = strtok(cmdtext, idx);
if (!strlen(skin))
{
SendClientMessage(playerid, 0xE60000FF, "Use: /Skin [id]");
return 1;
}
new newskin = strval(skin);
if ((newskin < 0) || (newskin > 299)) {
SendClientMessage(playerid, 0xE60000FF, "[ERRO] Este skin nгo existe!");
return 1;
}
if (GetPlayerMoney(playerid) >= 0)
{
SetPlayerSkin(playerid, newskin);
GivePlayerMoney(playerid,-0);
format(stringx, 128, "[INFO]: Agora Sua Skin и %d", newskin);
SendClientMessage(playerid, 0xE60000FF, stringx);
}
else
{
SendClientMessage(playerid, 0xE60000FF, "Vocк nгo pode mudar de skin");
}
return 1;
}
Re: [AJUDA] /trocarskin -
paulor - 25.02.2012
Bem basico.
pawn Код:
if(strcmp(cmdtext, "/trocarskin", true) == 0)//OnPlayerCommandText
{
return ShowPlayerDialog(playerid, 554, DIALOG_STYLE_INPUT, "Skin", "Digite a skin desejada", "Trocar", "Sair");
}
if(dialogid == 554)//OnDialogResponse
{
if(response)
{
SetPlayerSkin(playerid, strval(inputtext));
SendClientMessage(playerid, -1, "Info - Vocк trocou sua skin!");
}
}
Re: [AJUDA] /trocarskin -
Oakley_TwOPaCk - 25.02.2012
pawn Код:
format(stringx, 128, "[INFO]: Agora Sua Skin и %d", newskin);
SendClientMessage(playerid, 0xE60000FF, stringx);
Erro nessas duas linhas ai
Erro :
pawn Код:
C:\Documents and Settings\FAMILIA_\Desktop\DPSOriginal1\gamemodes\testing.pwn(1634) : error 017: undefined symbol "stringx"
C:\Documents and Settings\FAMILIA_\Desktop\DPSOriginal1\gamemodes\testing.pwn(1635) : error 017: undefined symbol "stringx"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
Re: [AJUDA] /trocarskin -
4LiSs0N - 25.02.2012
No Topo new stringx[256];
Re: [AJUDA] /trocarskin -
Lуs - 26.02.2012
pawn Код:
#define DIALOG_SKINS 1325
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_SKINS:
{
if(!response) return 1;
new skinid;
if(sscanf(inputtext, "d", skinid))
{
SendClientMessage(playerid, -1, "Digite somente nъmeros, ou digite algo.");
ShowPlayerDialog(playerid, DIALOG_SKINS, DIALOG_STYLE_INPUT, "Trocar skin", "Digite o ID da skin que vocк quer", "Ok", "Cancelar");
return 1;
}
if(0 < (skinid) > 299)
{
SendClientMessage(playerid, -1, "O ID tem que ser entre 0 e 299.");
ShowPlayerDialog(playerid, DIALOG_SKINS, DIALOG_STYLE_INPUT, "Trocar skin", "Digite o ID da skin que vocк quer", "Ok", "Cancelar");
return 1;
}
SetPlayerSkin(playerid, skinid);
}
}
return 1;
}
CMD:trocarskin(playerid)
{
ShowPlayerDialog(playerid, DIALOG_SKINS, DIALOG_STYLE_INPUT, "Trocar skin", "Digite o ID da skin que vocк quer", "Ok", "Cancelar");
return 1;
}
Re: [AJUDA] /trocarskin -
zbt - 26.02.2012
Havia feito um agora poco
pawn Код:
//cmd text
if ( strcmp ( cmdtext , "/trocarskin" , true ) == 0 ) {
return ShowPlayerDialog (playerid , ID , DIALOG_STYLE_INPUT , "Skin" , "Digite o id da skin" , "Pronto" , "Sair" ) ;
}
//ondialogresponse
switch ( dialogid ) {
case ID : {
if ( !response )
return SendClientMessage ( playerid , -1 ,"Seleзгo de skins cancelada!" ) ;
if( !strval ( inputtext ) )
return SendClientMessage( playerid , -1 , "Vocк nгo digitou nada--'" ) ;
switch ( strval ( inputtext ) ) {
case 1 .. 299 : {
new s [ 50 ] ;
format( s , 50 , "Vocк trocou sua skin para a id '%i" , strval( inputtext ) ) ;
SendClientMessage ( playerid , -1 ,s ) ;
SetPlayerSkin ( playerid , strval( inputtext ) ) ;
}
default: {
SendClientMessage ( playerid , -1 , "Skinid invalido!" );
}
}
}
return false;
}