[PEDIDO]sistema de /painel
#1

Tipo o meu gm tem que apertar o alt ou digitar /virarchave para ligar ou desligar o carro...e sendo que nao sei fazer /painel pois й muito complicado se alguem tiver o codigo ou uma Fs ficaria muito grato porque /painel й muito completo!!

PS: nao precisa ser este nome /painel pode ser outro mais que contenha as funзoes "Ligar, desligar, portamalas, acender farol, capo, guinchar/spawnar, vender" essas coisas ;] brigado!!
Reply
#2

Painel
Reply
#3

nesse site ensina a criar o dialog...
http://projetosjfs.tk/
Reply
#4

Esse coisa de ligar й do proprio GM ou FS?
Reply
#5

Tem fs !!Nao achei no search esse sistema -.-
Reply
#6

Hum, vocк tem ele facil ae? poderia me enviar?
Reply
#7

Ta ai, acabei de fazer:

PHP код:
public OnGameModeInit()
{
    for(new 
0MAX_VEHICLES++)
    {
        
SetVehicleParamsEx(c0000000);
    }
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == 2)
    {
        new 
enginelightsalarmdoorsbonnetbootobjective;
        
GetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnetbootobjective);
        if(
engine == 0) return SendClientMessage(playerid, -1"Para ligar o veiculo digite /painel e selecione a primeira opзгo.");
    }
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/painel"true) == 0)
    {
        if(
GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1"Vocк nгo dirigindo nenhum veiculo.");
        new 
veiculo GetVehicleModel(GetPlayerVehicleID(playerid));
        if(
Aviao(veiculo) || Trem(veiculo) || Heli(veiculo) || Barco(veiculo) || Bicicleta(veiculo) || Moto(veiculo)) return SendClientMessage(playerid, -1"Vocк nгo pode usar o painel neste veiculo.");
        
ShowPlayerDialog(playerid495DIALOG_STYLE_LIST"Painel do Veiculo:""Ligar/Desligar Veiculo\nLigar/Desligar Farуis\nLigar/Desligar Alarme\nAbrir/Fechar Capo\nAbrir/Fechar Porta-Malas""Selecionar""Cancelar");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 495)
    {
        if(
response == 1)
        {
            if(
listitem == 0)
            {
                new 
enginelightsalarmdoorsbonnetbootobjective;
                
GetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnetbootobjective);
                if(
engine == 0)
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1lightsalarmdoorsbonnetbootobjective);
                    
SendClientMessage(playerid, -1"Vocк ligou o motor.");
                }
                else
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0lightsalarmdoorsbonnetbootobjective);
                    
SendClientMessage(playerid, -1"Vocк desligou o motor.");
                }
            }
            else if(
listitem == 1)
            {
                new 
enginelightsalarmdoorsbonnetbootobjective;
                
GetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnetbootobjective);
                if(
lights == 0)
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine1alarmdoorsbonnetbootobjective);
                    
SendClientMessage(playerid, -1"Vocк ligou os farуis.");
                }
                else
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine0alarmdoorsbonnetbootobjective);
                    
SendClientMessage(playerid, -1"Vocк desligou os farуis.");
                }
            }
            else if(
listitem == 2)
            {
                new 
enginelightsalarmdoorsbonnetbootobjective;
                
GetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnetbootobjective);
                if(
alarm == 0)
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelights1doorsbonnetbootobjective);
                    
SendClientMessage(playerid, -1"Vocк ligou o alarme.");
                }
                else
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelights0doorsbonnetbootobjective);
                    
SendClientMessage(playerid, -1"Vocк desligou o alarme.");
                }
            }
            else if(
listitem == 3)
            {
                new 
enginelightsalarmdoorsbonnetbootobjective;
                
GetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnetbootobjective);
                if(
bonnet == 0)
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoors1bootobjective);
                    
SendClientMessage(playerid, -1"Vocк abriu o porta-malas.");
                }
                else
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoors0bootobjective);
                    
SendClientMessage(playerid, -1"Vocк fechou o porta-malas.");
                }
            }
            else if(
listitem == 4)
            {
                new 
enginelightsalarmdoorsbonnetbootobjective;
                
GetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnetbootobjective);
                if(
boot == 0)
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnet1objective);
                    
SendClientMessage(playerid, -1"Vocк abriu o capф.");
                }
                else
                {
                    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), enginelightsalarmdoorsbonnet0objective);
                    
SendClientMessage(playerid, -1"Vocк fechou o capф.");
                }
            }
        }
    }
    return 
1;
}
stock Aviao(veiculo//FEITO POR SHADOWW5
{
    if(
veiculo == 460 || veiculo == 476 || veiculo == 511 || veiculo == 512 || veiculo == 513 || veiculo == 519 || veiculo == 520 || veiculo == 553 || veiculo == 577 || veiculo == 592 || veiculo == 593)
    {
        return 
1;
    }
    return 
0;
}
stock Heli(veiculo//FEITO POR SHADOWW5
{
    if(
veiculo == 417 || veiculo == 425 || veiculo == 447 || veiculo == 469 || veiculo == 487 || veiculo == 488 || veiculo == 497 || veiculo == 548 || veiculo == 563)
    {
        return 
1;
    }
    return 
0;
}
stock Barco(veiculo//FEITO POR SHADOWW5
{
    if(
veiculo == 430 || veiculo == 446 || veiculo == 452 || veiculo == 453 || veiculo == 454 || veiculo == 472 || veiculo == 484 || veiculo == 493 || veiculo == 595)
    {
        return 
1;
    }
    return 
0;
}
stock Bicicleta(veiculo//FEITO POR SHADOWW5
{
    if(
veiculo == 481 || veiculo == 509 || veiculo == 510)
    {
        return 
1;
    }
    return 
0;
}
stock Trem(veiculo//FEITO POR SHADOWW5
{
    if(
veiculo == 449 || veiculo == 537 || veiculo == 538 || veiculo == 570)
    {
        return 
1;
    }
    return 
0;
}
stock Moto(veiculo//FEITO POR SHADOWW5
{
    if(
veiculo == 448 || veiculo == 461 || veiculo == 462 || veiculo == 463 || veiculo == 468 || veiculo == 521 || veiculo == 522 || veiculo == 523 || veiculo == 581 || veiculo == 586)
    {
        return 
1;
    }
    return 
0;

Pastebin.com: http://pastebin.com/raw.php?i=GCx4d0L8
Reply
#8

Shadow , abigo, todos os cуdigos ъteis, gf da vida possuem esse cуdigo, portanto nгo diga que foi vocк que criou que ninguйm vai acreditar ;x
E nгo precisa fica criando ISBIKE, IS TREM BLA BLA BLA, todos os veнculos sгo invбlidos para usar o painel, portanto sу precisa de 1 sу funзгo.


PHP код:

stock VeiculoInvalido
(j_carro) {
    new 
veiculo GetVehicleModel(j_carro);
    if(
veiculo == 449 || veiculo == 537 || veiculo == 538 || veiculo == 570) return 0x01;
    else if(
veiculo == 448 || veiculo == 461 || veiculo == 462 || veiculo == 463 || veiculo == 468 || veiculo == 521 || veiculo == 522 || veiculo == 523 || veiculo == 581 || veiculo == 586) return 0x01;
    else if(
veiculo == 481 || veiculo == 509 || veiculo == 510) return 0x01;
    else if(
veiculo == 430 || veiculo == 446 || veiculo == 452 || veiculo == 453 || veiculo == 454 || veiculo == 472 || veiculo == 484 || veiculo == 493 || veiculo == 595) return 0x01;
    else if(
veiculo == 417 || veiculo == 425 || veiculo == 447 || veiculo == 469 || veiculo == 487 || veiculo == 488 || veiculo == 497 || veiculo == 548 || veiculo == 563) return 0x01;
    else if(
veiculo == 460 || veiculo == 476 || veiculo == 511 || veiculo == 512 || veiculo == 513 || veiculo == 519 || veiculo == 520 || veiculo == 553 || veiculo == 577 || veiculo == 592 || veiculo == 593) return 0x01;
    return 
0x0;
}
    if(
strcmp(cmdtext"/painel"true) == 0) {
        if(
GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1"Vocк nгo dirigindo nenhum veiculo.");
        else if(
VeiculoInvalido(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, -1"Vocк nгo pode usar o painel neste veiculo.");
        
ShowPlayerDialog(playerid495DIALOG_STYLE_LIST"Painel do Veiculo:""Ligar/Desligar Veiculo\nLigar/Desligar Farуis\nLigar/Desligar Alarme\nAbrir/Fechar Capo\nAbrir/Fechar Porta-Malas""Selecionar""Cancelar");
        return 
0x01;
    } 
Reply
#9

Podem nгo acreditar, todavia fui eu quem fiz sim !

Acredite quem quiser, doa a quem doer. Ok ? :*
Reply
#10

Ae, eu fui copiei e colei no ongamemodint como vocк falo deu isso

Код:
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11344) : error 021: symbol already defined: "OnPlayerStateChange"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11366) : error 021: symbol already defined: "OnDialogResponse"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11495) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11500) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11502) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11508) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11511) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11516) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11523) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11525) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11531) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11538) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11540) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11546) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11568) : error 021: symbol already defined: "AddStaticPickup"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11590) : error 021: symbol already defined: "AddStaticPickup"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11601) : error 021: symbol already defined: "AddStaticPickup"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11630) : error 021: symbol already defined: "AddStaticPickup"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11635) : error 021: symbol already defined: "AddStaticPickup"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11652) : error 021: symbol already defined: "AddStaticPickup"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11674) : error 021: symbol already defined: "AddStaticPickup"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : error 010: invalid function or declaration
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : error 021: symbol already defined: "F_CreateObject"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : warning 215: expression has no effect
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : warning 215: expression has no effect
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : warning 215: expression has no effect
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : warning 215: expression has no effect
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : warning 215: expression has no effect
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Erick\Desktop\Brasil Magic Games\gamemodes\GAMEMOD.pwn(11896) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


25 Errors.
kkkkkkkkkkkkkkkkkkkk
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)