SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 12/03/2018, 02:37 AM   #1
tcharles2011
Big Clucker
 
Join Date: Feb 2014
Posts: 61
Reputation: 0
Default veiculo publico não esta cobrando money

Bom eu tava fazendo um sistema de veiculos publicos onde se os jogadores usar eles paga uma TAXA X
HTML Code:
new VRC[11]; 
public OnPlayerConnect(playerid)
{
    for(new rcv; rcv < MAX_VEHICLES; rcv++)
    {
        if(rcv >= VRC[0] && rcv <= VRC[sizeof(VRC)-1])
        {
			format(STRX, sizeof(STRX), "{7CFC00}%s\n{FFFFFF}•• Veículo Publico ••", veehName[GetVehicleModel(rcv)-400]);
            new Text3D:d3d = Create3DTextLabel(STRX, 0xFFFFFFFF, 0.0, 0.0, 0.0, 10.0, 0);
            Attach3DTextLabelToVehicle(d3d, rcv, 0.0, 0.0, 0.0);
            GivePlayerGrana (playerid, -400);

        }
    }
    return 1;
}
pois eu tentei de 2 formas e não deu

GivePlayerGrana (playerid, -400);
(rcv)-400]);
tcharles2011 is offline   Reply With Quote
Old 12/03/2018, 10:59 AM   #2
Kleberson
Little Clucker
 
Join Date: Dec 2015
Posts: 16
Reputation: 0
Default Re: veiculo publico não esta cobrando money

Code:
new VRC[11]; 
public OnPlayerConnect(playerid)
{
for(new rcv; rcv < MAX_VEHICLES; rcv++)
{
if(rcv >= VRC[0] && rcv <= VRC[sizeof(VRC)-1])
{
format(STRX, sizeof(STRX), "{7CFC00}%s\n{FFFFFF}•• Veículo Publico ••", veehName[GetVehicleModel(rcv)-400]);
new Text3D:d3d = Create3DTextLabel(STRX, 0xFFFFFFFF, 0.0, 0.0, 0.0, 10.0, 0);
Attach3DTextLabelToVehicle(d3d, rcv, 0.0, 0.0, 0.0);
GivePlayerGrana( playerid, -5000 );

}
}
return 1;
}
Kleberson is offline   Reply With Quote
Old 13/03/2018, 02:24 AM   #3
tcharles2011
Big Clucker
 
Join Date: Feb 2014
Posts: 61
Reputation: 0
Default Re: veiculo publico não esta cobrando money

alguem?
tcharles2011 is offline   Reply With Quote
Old 13/03/2018, 02:46 AM   #4
[BOPE]Seu._.Madruga
Gangsta
 
[BOPE]Seu._.Madruga's Avatar
 
Join Date: Nov 2011
Location: São Paulo - SP
Posts: 922
Reputation: 69
Default Re: veiculo publico não esta cobrando money

Gatão tá fazendo tudo errado, mostra o código desde o começo.

Desde aonde cria os carros públicos para nos vermos as variáveis.
__________________

_\|/_ Ei vey é Nozes _\|/_

Nick: LeozinIMPERATUS

Patente: Coronel 3

Página Oficial: Leonardo " lbs " Bradoks » www.facebo ok.com/leobradoks
Página de Programação: Programação em Foco » www.facebo ok.com/groups/ProgramacaoEmFoco
Atualmente focado ao competitivo de Point Blank
Email | Site Pessoal | Skype
O topo da inteligência é alcançar a humildade
[BOPE]Seu._.Madruga is offline   Reply With Quote
Old 13/03/2018, 03:08 AM   #5
[BOPE]Seu._.Madruga
Gangsta
 
[BOPE]Seu._.Madruga's Avatar
 
Join Date: Nov 2011
Location: São Paulo - SP
Posts: 922
Reputation: 69
Default Re: veiculo publico não esta cobrando money

PHP Code:
#include <a_samp>

new VehPublico[3];

new 
VehicleNames[][] =
{
    
"Landstalker""Bravura""Buffalo""Linerunner""Perrenial""Sentinel",
    
"Dumper""Firetruck""Trashmaster""Stretch""Manana""Infernus",
    
"Voodoo""Pony""Mule""Cheetah""Ambulance""Leviathan""Moonbeam",
    
"Esperanto""Taxi""Washington""Bobcat""Whoopee""BF Injection",
    
"Hunter""Premier""Enforcer""Securicar""Banshee""Predator""Bus",
    
"Rhino""Barracks""Hotknife""Trailer""Previon""Coach""Cabbie",
    
"Stallion""Rumpo""RC Bandit""Romero""Packer""Monster""Admiral",
    
"Squalo""Seasparrow""Pizzaboy""Tram""Trailer""Turismo""Speeder",
    
"Reefer""Tropic""Flatbed""Yankee""Caddy""Solair""Berkley's RC Van",
    
"Skimmer""PCJ-600""Faggio""Freeway""RC Baron""RC Raider""Glendale",
    
"Oceanic","Sanchez""Sparrow""Patriot""Quad""Coastguard""Dinghy",
    
"Hermes""Sabre""Rustler""ZR-350""Walton""Regina""Comet""BMX",
    
"Burrito""Camper""Marquis""Baggage""Dozer""Maverick""News Chopper",
    
"Rancher""FBI Rancher""Virgo""Greenwood""Jetmax""Hotring""Sandking",
    
"Blista Compact""Police Maverick""Boxville""Benson""Mesa""RC Goblin",
    
"Hotring Racer A""Hotring Racer B""Bloodring Banger""Rancher""Super GT",
    
"Elegant""Journey""Bike""Mountain Bike""Beagle""Cropduster""Stunt",
     
"Tanker""Roadtrain""Nebula""Majestic""Buccaneer""Shamal""Hydra",
     
"FCR-900""NRG-500""HPV1000""Cement Truck""Tow Truck""Fortune",
     
"Cadrona""FBI Truck""Willard""Forklift""Tractor""Combine""Feltzer",
     
"Remington""Slamvan""Blade""Freight""Streak""Vortex""Vincent",
    
"Bullet""Clover""Sadler""Firetruck""Hustler""Intruder""Primo",
    
"Cargobob""Tampa""Sunrise""Merit""Utility""Nevada""Yosemite",
    
"Windsor""Monster""Monster""Uranus""Jester""Sultan""Stratium",
    
"Elegy""Raindance""RC Tiger""Flash""Tahoma""Savanna""Bandito",
    
"Freight Flat""Streak Carriage""Kart""Mower""Dune""Sweeper",
    
"Broadway""Tornado""AT-400""DFT-30""Huntley""Stafford""BF-400",
    
"News Van""Tug""Trailer""Emperor""Wayfarer""Euros""Hotdog""Club",
    
"Freight Box""Trailer""Andromada""Dodo""RC Cam""Launch""Police Car",
     
"Police Car""Police Car""Police Ranger""Picador""S.W.A.T""Alpha",
     
"Phoenix""Glendale""Sadler""Luggage""Luggage""Stairs""Boxville",
     
"Tiller""Utility Trailer"
};

main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}

public 
OnGameModeInit()
{
    
VehPublico[0] = CreateVehicle(4110000.0000,0000.0000,0000.0000,0000.0000, -1, -199999);
    
VehPublico[1] = CreateVehicle(4110000.0000,0000.0000,0000.0000,0000.0000, -1, -199999);
    
VehPublico[2] = CreateVehicle(4110000.0000,0000.0000,0000.0000,0000.0000, -1, -199999);
    return 
1;
}

public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    new 
str[124], Text3D:VehPublicoText3D[MAX_VEHICLES];
    for(new 
iMAX_VEHICLESi++)
    {
        if(
GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
            if(
GetPlayerVehicleID(playerid) == VehPublico[0] || VehPublico[1] || VehPublico[2]) {
                if(
GetPlayerMoney(playerid) >= 400) {
                    
format(strsizeof(str), "{7CFC00}%s\n{FFFFFF}•• Veículo Publico ••"VehicleNames[GetVehicleModel(vehicleid)-400]);
                    
VehPublicoText3D[vehicleid] = Create3DTextLabel(str0xFFFFFFFF0.00.00.010.00);
                    
Attach3DTextLabelToVehicle(VehPublicoText3D[vehicleid], GetPlayerVehicleID(playerid), 0.00.00.0);
                    
GivePlayerMoney(playerid, -400);
                } else {
                    
SendClientMessage(playerid, -1"[ ERRO ] {FF0000}Você não tem dinheiro suficiente para alugar este veículo público por R$400");
                    
RemovePlayerFromVehicle(playerid);
                }
            }
        }
    }
    return 
1;

__________________

_\|/_ Ei vey é Nozes _\|/_

Nick: LeozinIMPERATUS

Patente: Coronel 3

Página Oficial: Leonardo " lbs " Bradoks » www.facebo ok.com/leobradoks
Página de Programação: Programação em Foco » www.facebo ok.com/groups/ProgramacaoEmFoco
Atualmente focado ao competitivo de Point Blank
Email | Site Pessoal | Skype
O topo da inteligência é alcançar a humildade
[BOPE]Seu._.Madruga is offline   Reply With Quote
Old 13/03/2018, 03:07 PM   #6
HelderPT
Huge Clucker
 
HelderPT's Avatar
 
Join Date: Jan 2018
Location: São Miguel
Posts: 340
Reputation: 11
Default Re: veiculo publico não esta cobrando money

Quote:
Originally Posted by [BOPE]Seu._.Madruga View Post
PHP Code:
#include <a_samp>

new VehPublico[3];

new 
VehicleNames[][] =
{
    
"Landstalker""Bravura""Buffalo""Linerunner""Perrenial""Sentinel",
    
"Dumper""Firetruck""Trashmaster""Stretch""Manana""Infernus",
    
"Voodoo""Pony""Mule""Cheetah""Ambulance""Leviathan""Moonbeam",
    
"Esperanto""Taxi""Washington""Bobcat""Whoopee""BF Injection",
    
"Hunter""Premier""Enforcer""Securicar""Banshee""Predator""Bus",
    
"Rhino""Barracks""Hotknife""Trailer""Previon""Coach""Cabbie",
    
"Stallion""Rumpo""RC Bandit""Romero""Packer""Monster""Admiral",
    
"Squalo""Seasparrow""Pizzaboy""Tram""Trailer""Turismo""Speeder",
    
"Reefer""Tropic""Flatbed""Yankee""Caddy""Solair""Berkley's RC Van",
    
"Skimmer""PCJ-600""Faggio""Freeway""RC Baron""RC Raider""Glendale",
    
"Oceanic","Sanchez""Sparrow""Patriot""Quad""Coastguard""Dinghy",
    
"Hermes""Sabre""Rustler""ZR-350""Walton""Regina""Comet""BMX",
    
"Burrito""Camper""Marquis""Baggage""Dozer""Maverick""News Chopper",
    
"Rancher""FBI Rancher""Virgo""Greenwood""Jetmax""Hotring""Sandking",
    
"Blista Compact""Police Maverick""Boxville""Benson""Mesa""RC Goblin",
    
"Hotring Racer A""Hotring Racer B""Bloodring Banger""Rancher""Super GT",
    
"Elegant""Journey""Bike""Mountain Bike""Beagle""Cropduster""Stunt",
     
"Tanker""Roadtrain""Nebula""Majestic""Buccaneer""Shamal""Hydra",
     
"FCR-900""NRG-500""HPV1000""Cement Truck""Tow Truck""Fortune",
     
"Cadrona""FBI Truck""Willard""Forklift""Tractor""Combine""Feltzer",
     
"Remington""Slamvan""Blade""Freight""Streak""Vortex""Vincent",
    
"Bullet""Clover""Sadler""Firetruck""Hustler""Intruder""Primo",
    
"Cargobob""Tampa""Sunrise""Merit""Utility""Nevada""Yosemite",
    
"Windsor""Monster""Monster""Uranus""Jester""Sultan""Stratium",
    
"Elegy""Raindance""RC Tiger""Flash""Tahoma""Savanna""Bandito",
    
"Freight Flat""Streak Carriage""Kart""Mower""Dune""Sweeper",
    
"Broadway""Tornado""AT-400""DFT-30""Huntley""Stafford""BF-400",
    
"News Van""Tug""Trailer""Emperor""Wayfarer""Euros""Hotdog""Club",
    
"Freight Box""Trailer""Andromada""Dodo""RC Cam""Launch""Police Car",
     
"Police Car""Police Car""Police Ranger""Picador""S.W.A.T""Alpha",
     
"Phoenix""Glendale""Sadler""Luggage""Luggage""Stairs""Boxville",
     
"Tiller""Utility Trailer"
};

main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}

public 
OnGameModeInit()
{
    
VehPublico[0] = CreateVehicle(4110000.0000,0000.0000,0000.0000,0000.0000, -1, -199999);
    
VehPublico[1] = CreateVehicle(4110000.0000,0000.0000,0000.0000,0000.0000, -1, -199999);
    
VehPublico[2] = CreateVehicle(4110000.0000,0000.0000,0000.0000,0000.0000, -1, -199999);
    return 
1;
}

public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    new 
str[124], Text3D:VehPublicoText3D[MAX_VEHICLES];
    for(new 
iMAX_VEHICLESi++)
    {
        if(
GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
            if(
GetPlayerVehicleID(playerid) == VehPublico[0] || VehPublico[1] || VehPublico[2]) {
                if(
GetPlayerMoney(playerid) >= 400) {
                    
format(strsizeof(str), "{7CFC00}%s\n{FFFFFF}•• Veículo Publico ••"VehicleNames[GetVehicleModel(vehicleid)-400]);
                    
VehPublicoText3D[vehicleid] = Create3DTextLabel(str0xFFFFFFFF0.00.00.010.00);
                    
Attach3DTextLabelToVehicle(VehPublicoText3D[vehicleid], GetPlayerVehicleID(playerid), 0.00.00.0);
                    
GivePlayerMoney(playerid, -400);
                } else {
                    
SendClientMessage(playerid, -1"[ ERRO ] {FF0000}Você não tem dinheiro suficiente para alugar este veículo público por R$400");
                    
RemovePlayerFromVehicle(playerid);
                }
            }
        }
    }
    return 
1;







Obrigado precissa de um sistema parecido muito obrigado
__________________
Atualmente estou com um projeto chamado ParaísoVirtual

Caso queira fazer parte da equipe me chame no privado
HelderPT 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] Verificar se esta proximo de um veiculo rol3Play Português/Portuguese 2 13/05/2016 10:08 PM
[Ajuda] Veiculo não está sendo criado ERICcartmanN Português/Portuguese 0 01/05/2016 01:35 PM
[Ajuda] Verificar se o veículo está ocupado [email protected] Português/Portuguese 5 16/06/2014 09:57 PM
[Ajuda] Não está cobrando. Ley Português/Portuguese 9 01/10/2012 05:45 PM


All times are GMT. The time now is 02:05 PM.


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