SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 03/02/2014, 12:47 AM   #1
xXCallXX
Big Clucker
 
xXCallXX's Avatar
 
Join Date: Jan 2014
Posts: 154
Reputation: 0
Default comando de skin por id

tipo digita /skin id dar skin ajuda ae
xXCallXX is offline   Reply With Quote
Old 03/02/2014, 12:49 AM   #2
FallweN
Huge Clucker
 
FallweN's Avatar
 
Join Date: Jan 2014
Location: Search on Google
Posts: 248
Reputation: 44
Default Re: comando de skin por id

pawn Code:
CMD:skin(playerid, params[]) {
    new Skin;
   
    if(sscanf(params, "i", Skin))
        return SendClientMessage(playerid, -1, "/Skin ID");
       
    SetPlayerSkin(playerid, Skin);
    return true;
}

mano melhore seu português porque ta feia a coisa.
FallweN is offline   Reply With Quote
Old 03/02/2014, 12:54 AM   #3
kevinho.007
Big Clucker
 
kevinho.007's Avatar
 
Join Date: Apr 2012
Posts: 62
Reputation: 6
Default Re: comando de skin por id

Code:
CMD:mudarskin(playerid, params[]) 
{
    new idskin;
    if(sscanf(params, "u", idskin))  return SendClientMessage(playerid, -1, "Digite: /mudarskin [id da skin]");
    SendClientMessage(playerid,-1,"Você mudou sua roupa.");
    SetPlayerSkin(playerid, idskin);
    return 1;
}
__________________
Iniciante Em Pawn
kevinho.007 is offline   Reply With Quote
Old 03/02/2014, 01:01 AM   #4
xXCallXX
Big Clucker
 
xXCallXX's Avatar
 
Join Date: Jan 2014
Posts: 154
Reputation: 0
Default Re: comando de skin por id



deu merda
xXCallXX is offline   Reply With Quote
Old 03/02/2014, 01:24 AM   #5
kevinho.007
Big Clucker
 
kevinho.007's Avatar
 
Join Date: Apr 2012
Posts: 62
Reputation: 6
Default Re: comando de skin por id

Quote:
Originally Posted by xXCallXX View Post


deu merda
Code:
if(strcmp(cmd, "/mudarskin", true) == 0)
{
     	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)) return SendClientMessage(playerid, -1, "Digite: /mudarskin [skin id]");
	new level;
	tmp = strtok(cmdtext, idx);
	level = strval(tmp);
	if(level > 299 || level < 1) return SendClientMessage(playerid, -1, "id desconhecido!"); 
	SetPlayerSkin(playerid, level);
	return 1;
}
__________________
Iniciante Em Pawn
kevinho.007 is offline   Reply With Quote
Old 03/02/2014, 01:45 AM   #6
rjjj
Big Clucker
 
rjjj's Avatar
 
Join Date: Jan 2014
Location: Acre, Brasil
Posts: 65
Reputation: 54
Default Re: comando de skin por id

Adicione isto ao seu OnPlayerCommandText :


pawn Code:
if(!strfind(cmdtext, "/skin", true))
    {
        if(cmdtext[5] == '\0' || cmdtext[5] == ' ')
        {
            if(cmdtext[5] != ' ' || cmdtext[6] == '\0')   return SendClientMessage(playerid, 0xFFFFFFAA, "Digite: /skin [id da skin]");
            for(new x = 6; cmdtext[x] != EOS; x++)
            {
                if(cmdtext[x] != ' ')
                {
                    new STR[4];
                    strcat(STR, cmdtext[x]);
                    for(new y = 0; STR[y] != EOS; y++)
                    {
                        if(STR[y] < '0' || STR[y] > '9')
                        {
                            SendClientMessage(playerid, 0xFFFFFFAA, "Digite: /skin [id da skin]");
                            return true;
                        }
                    }
                    new SkinID = strval(cmdtext[x]);
                    if(SkinID > 299)  return  SendClientMessage(playerid, 0xFFFFFFAA, "IDs de skins são válidos até 299 !");
                    SetPlayerSkin(playerid, SkinID);
                    SendClientMessage(playerid, 0x33CCFFAA, "Sua skin foi definida com sucesso !");
                    return true;
                }
            }
            SendClientMessage(playerid, 0xFFFFFFAA, "Digite: /skin [id da skin]");
            return true;
        }
    }



Espero ter ajudado .
__________________



Last edited by rjjj; 03/02/2014 at 05:37 PM.
rjjj is offline   Reply With Quote
Old 03/02/2014, 02:20 AM   #7
giovanehen
Little Clucker
 
Join Date: Apr 2013
Posts: 49
Reputation: 0
Default Re: comando de skin por id

PHP Code:
COMMAND:setskin(playeridparams[])
{
    
// Setup local variables
    
new Msg[128], Skin;

    
// Send the command to all admins so they can see it
    
SendAdminText(playerid"/setskin"params);

    
// Check if the player has logged in
    
if (APlayerData[playerid][LoggedIn] == true)
    {
        
// Check if the player's admin-level is at least 4
        
if (APlayerData[playerid][PlayerLevel] >= 0)
        {
            if (
sscanf(params"i"Skin)) SendClientMessage(playerid0xFF0000AA"Digite: \"/setskin <skin-id (0-299)>\"");
            else
            {
                
// Check if the player entered a valid skin-id
                
if ((Skin >= 0) && (Skin <= 299))
                {
                    
// Set the skin for the player
                    
SetPlayerSkin(playeridSkin);
                    
// Let the other player know the reason too
                    
format(Msg128"{808080}Voce Mudou a Sua Skin pela Skin: {FFFFFF}%i"Skin);
                    
SendClientMessage(playerid0xFFFFFFFFMsg);
                }
                else
                    
SendClientMessage(playerid0xFFFFFFFF"{808080}Skin Invalida. Digite uma Skin de 0 a 299");
            }
        }
        else
            return 
0;
    }
    else
        return 
0;

    
// Let the server know that this was a valid command
    
return 1;

giovanehen is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Pedido] comando skin + rep lekinho911 Português/Portuguese 9 04/08/2013 02:04 AM
[Pedido] Comando Skin VenoN Português/Portuguese 13 26/08/2012 04:09 PM
[pedido]Comando /pintar e comando /skin @ReeF Português/Portuguese 8 17/12/2011 10:19 PM
[Tutorial] Como fazer comando /Skin trocando o nome pelo o numero ou nome que deseja setar a skin ViCtOr_Mc Lançamentos/Releases 23 19/09/2011 07:34 PM
[PEDIDO] Comando /skin BurnouT_ Português/Portuguese 24 16/11/2010 08:50 PM


All times are GMT. The time now is 10:15 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.