SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 24/06/2011, 01:17 PM   #1
Ichigo_Kurosaki
Huge Clucker
 
Ichigo_Kurosaki's Avatar
 
Join Date: Sep 2010
Posts: 378
Reputation: 1
Question [Ajuda] Fazendo Comando

Olá pessoal do Forum-samp estou aqui com uma dúvida.

eu fiz esse comando :

pawn Code:
if (strcmp("/tunados2", cmdtext, true, 10) == 0)
    {
        new listitems[] = "Elegy\nSultan\nInfernus\nBullet";
        ShowPlayerDialog(playerid,222,DIALOG_STYLE_LIST,"Lista de Carros:",listitems,"Selecionar","Sair");
        return 1;
    }

E agora o que faço?

eu to querendo que o cara escolha o Carro, e esse carro aparece na frente dele. mais ou menos assim:

pawn Code:
new Float:X,Float:Y,Float:Z,Float:Angle, carid;
    GetPlayerPos(playerid,X,Y,Z);
    GetPlayerFacingAngle(playerid,Angle);
    carid = GetPlayerVehicleID(playerid);
    carid = CreateVehicle(562,X,Y,Z,0.0,-1,-1,9000000);
    vehCriados[carid] = 1;
    LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
    AddVehicleComponent(carid,1163);
    AddVehicleComponent(carid,1036);
    AddVehicleComponent(carid,1038);
    AddVehicleComponent(carid,1049);
    AddVehicleComponent(carid,1040);
    AddVehicleComponent(carid,1038);
    AddVehicleComponent(carid,1147);
    AddVehicleComponent(carid,1010);
    AddVehicleComponent(carid,1079);
    ChangeVehiclePaintjob(carid,2);
    TogglePlayerControllable(playerid,true);
    }
__________________
Brasil Samp RP/G
- 198.24.170.170:7797
- Vagas de Divulguer
- Vagas de LideR
- Tiro na Skin
- HeadShot Sisten
Nossa Page no face
Ichigo_Kurosaki is offline   Reply With Quote
Old 24/06/2011, 01:57 PM   #2
CocaC0la
Big Clucker
 
CocaC0la's Avatar
 
Join Date: Jun 2011
Posts: 142
Reputation: 11
Default Re: [[[Ajuda]]] Fazendo Comando

para aparecer na frente, lado onde desejar utilize as Floats , e incremente posições a eles 2+X,50-Y.. assim vai

PHP Code:
if (strcmp("/tunados2"cmdtexttrue10) == 0)
{
     new 
listitems[] = "Elegy\nSultan\nInfernus\nBullet";
     
ShowPlayerDialog(playerid,222,DIALOG_STYLE_LIST,"Lista de Carros:",listitems,"Selecionar","Sair");
     return 
1;
}


public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{

    if(
dialogid == 222) {
        if(
response) {
            if(
listitem == 0) {
                new 
Float:X,Float:Y,Float:Z,Float:Anglecarid;
                
GetPlayerPos(playerid,X,Y,Z);
                
GetPlayerFacingAngle(playerid,Angle);
                
carid GetPlayerVehicleID(playerid);
                
carid CreateVehicle(ID DO CARRO ELEGY,X,Y,Z,0.0,-1,-1,9000000);
                
//vehCriados[carid] = 1;
                
LinkVehicleToInterior(caridGetPlayerInterior(playerid));
                
AddVehicleComponent(carid,1163);
                
AddVehicleComponent(carid,1036);
                
AddVehicleComponent(carid,1038);
                
AddVehicleComponent(carid,1049);
                
AddVehicleComponent(carid,1040);
                
AddVehicleComponent(carid,1038);
                
AddVehicleComponent(carid,1147);
                
AddVehicleComponent(carid,1010);
                
AddVehicleComponent(carid,1079);
                
ChangeVehiclePaintjob(carid,2);
                
TogglePlayerControllable(playerid,true);

            }
            if(
listitem == 1) {
                new 
Float:X,Float:Y,Float:Z,Float:Anglecarid;
                
GetPlayerPos(playerid,X,Y,Z);
                
GetPlayerFacingAngle(playerid,Angle);
                
carid GetPlayerVehicleID(playerid);
                
carid CreateVehicle(ID DO CARRO SULTAN,X,Y,Z,0.0,-1,-1,9000000);
                
//vehCriados[carid] = 1;
                
LinkVehicleToInterior(caridGetPlayerInterior(playerid));
                
AddVehicleComponent(carid,1163);
                
AddVehicleComponent(carid,1036);
                
AddVehicleComponent(carid,1038);
                
AddVehicleComponent(carid,1049);
                
AddVehicleComponent(carid,1040);
                
AddVehicleComponent(carid,1038);
                
AddVehicleComponent(carid,1147);
                
AddVehicleComponent(carid,1010);
                
AddVehicleComponent(carid,1079);
                
ChangeVehiclePaintjob(carid,2);
                
TogglePlayerControllable(playerid,true);
            }
            if(
listitem == 2) {
                new 
Float:X,Float:Y,Float:Z,Float:Anglecarid;
                
GetPlayerPos(playerid,X,Y,Z);
                
GetPlayerFacingAngle(playerid,Angle);
                
carid GetPlayerVehicleID(playerid);
                
carid CreateVehicle(ID DO INFERNUS,X,Y,Z,0.0,-1,-1,9000000);
                
//vehCriados[carid] = 1;
                
LinkVehicleToInterior(caridGetPlayerInterior(playerid));
                
AddVehicleComponent(carid,1163);
                
AddVehicleComponent(carid,1036);
                
AddVehicleComponent(carid,1038);
                
AddVehicleComponent(carid,1049);
                
AddVehicleComponent(carid,1040);
                
AddVehicleComponent(carid,1038);
                
AddVehicleComponent(carid,1147);
                
AddVehicleComponent(carid,1010);
                
AddVehicleComponent(carid,1079);
                
ChangeVehiclePaintjob(carid,2);
                
TogglePlayerControllable(playerid,true);
            }
            if(
listitem == 3) {
                new 
Float:X,Float:Y,Float:Z,Float:Anglecarid;
                
GetPlayerPos(playerid,X,Y,Z);
                
GetPlayerFacingAngle(playerid,Angle);
                
carid GetPlayerVehicleID(playerid);
                
carid CreateVehicle(ID DO BULLLET,X,Y,Z,0.0,-1,-1,9000000);
                
//vehCriados[carid] = 1;
                
LinkVehicleToInterior(caridGetPlayerInterior(playerid));
                
AddVehicleComponent(carid,1163);
                
AddVehicleComponent(carid,1036);
                
AddVehicleComponent(carid,1038);
                
AddVehicleComponent(carid,1049);
                
AddVehicleComponent(carid,1040);
                
AddVehicleComponent(carid,1038);
                
AddVehicleComponent(carid,1147);
                
AddVehicleComponent(carid,1010);
                
AddVehicleComponent(carid,1079);
                
ChangeVehiclePaintjob(carid,2);
                
TogglePlayerControllable(playerid,true);

                return 
1;
            }
        }
    }
    return 
0;


Last edited by CocaC0la; 24/06/2011 at 06:32 PM.
CocaC0la is offline   Reply With Quote
Old 24/06/2011, 02:00 PM   #3
Shadoww5
High-roller
 
Join Date: Apr 2011
Posts: 2,196
Reputation: 61
Default Re: [[[Ajuda]]] Fazendo Comando

Bullet: 541
Elegy: 562
Infernus: 411
Sultan: 560
Shadoww5 is offline   Reply With Quote
Old 24/06/2011, 02:10 PM   #4
Ichigo_Kurosaki
Huge Clucker
 
Ichigo_Kurosaki's Avatar
 
Join Date: Sep 2010
Posts: 378
Reputation: 1
Default Respuesta: [[[Ajuda]]] Fazendo Comando

Brigado Shadoww5 e CocaC0la, Topico Resolvido
__________________
Brasil Samp RP/G
- 198.24.170.170:7797
- Vagas de Divulguer
- Vagas de LideR
- Tiro na Skin
- HeadShot Sisten
Nossa Page no face
Ichigo_Kurosaki 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
[ajuda] Fazendo arma comum paralizar as pessoas Sonic Hero Português/Portuguese 32 12/06/2011 07:54 PM
[ajuda] Fazendo /infoorg para thug?? Sonic Hero Português/Portuguese 3 11/04/2011 05:33 PM
[Ajuda] O que eu to fazendo de errado? Oo steki. Português/Portuguese 2 14/12/2010 06:39 PM
[AJUDA] Announce fazendo Flood '-' BurnouT_ Português/Portuguese 22 11/11/2010 03:11 PM
[AJUDA]Fazendo GM RPG (LEIA) Kasura Português/Portuguese 40 06/09/2010 07:21 PM


All times are GMT. The time now is 08:14 PM.


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