SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 07/01/2017, 05:00 PM   #1
LuanGamer
Big Clucker
 
Join Date: Oct 2016
Posts: 76
Reputation: 0
Exclamation Verificação

Boa tarde, estou desenvolvendo um complemento no código para verificar se ambos os players estão dentro do veiculo (416, uma ambulancia) para o comando /cura, mas não obtive exito ainda, se alguém puder ajudar segue o código:

PHP Code:
if(giveplayerid != INVALID_PLAYER_ID)
                {
                    
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    if(
PlayerInfo[playerid][pMembro]==20||PlayerInfo[playerid][pLider]==20)//||PlayerInfo[playerid][pMembro]==4||PlayerInfo[playerid][pLider]==4)//model
                    
{
                        new 
Veh GetPlayerVehicleID(playerid);
                        if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 416)//IsAnAmbulanceCar(Veh)
                        
{
                            if(!
IsPlayerInVehicle(playeridVeh) && !IsPlayerInVehicle(giveplayeridVeh))
                            {
                            
SendClientMessage(playeridCOLOR_GRAD1"  Vocês dois precisam estar na ambulância dos bombeiros!");
                            return 
true;
                            }
                            
format(stringsizeof(string), "~y~Voce curou da tontura ~n~~w~%s~n~~g~R$%d"giveplayer,mon);
                            
GameTextForPlayer(playeridstring50001);
                            
GiveDinheiro(playerid,mon);
                            
GiveDinheiro(giveplayerid,-mon);
                            
SetPlayerDrunkLevel(giveplayerid0);
                            
PlayerDrunk[giveplayerid] = 0;
                            
PlayerDrunkTime[giveplayerid] = 0;
                            
SetPlayerDrunkLevel (giveplayerid0);
                            if(
PlayerInfo[playerid][pPainPerk] > 0)
                            {
                            
SetPlayerDrunkLevel(giveplayerid0);
                            
PlayerDrunk[giveplayerid] = 0;
                            
PlayerDrunkTime[giveplayerid] = 0;
                            
SetPlayerDrunkLevel (giveplayerid0);
                            }
                            else
                            {
                            
SetPlayerDrunkLevel(giveplayerid0);
                            
PlayerDrunk[giveplayerid] = 0;
                            
PlayerDrunkTime[giveplayerid] = 0;
                            
SetPlayerDrunkLevel (giveplayerid0);
                            }
                            
PlayerPlaySound(playerid11500.00.00.0);
                            
PlayerPlaySound(giveplayerid11500.00.00.0);
                            
format(stringsizeof(string), "Você foi curado da tontura pelo bombeiro %s, por -R$%d",NomePlayer(playerid),mon);
                            
SendClientMessage(giveplayeridCOLOR_LIGHTBLUE,string);
                            if(
PlayerDrunk[giveplayerid] > 0)
                            {
                                
PlayerDrunk[giveplayerid] = 0;
                                
SendClientMessage(giveplayeridCOLOR_LIGHTBLUE"* Você não está com tontura!");
                            }
                        }
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"Você não está autorizado a usar o comando!");
                        return 
true;
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1" Esse jogador está offline");
            }
            return 
true;
    } 
Ainda está curando com pelo menos 1 dos players do lado de dentro, e queria os dois. Obrigado pela atenção.
LuanGamer 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] Verificação. SukMathcuck Português/Portuguese 11 12/12/2016 11:00 PM
[Ajuda] Verificação fdsda Português/Portuguese 0 30/01/2016 11:20 PM
[Ajuda] Verificacao² iTouchS Português/Portuguese 7 22/01/2016 01:28 AM
[Ajuda] Verificação Dayvison_ Português/Portuguese 5 17/01/2016 02:15 PM
[Pedido] um verificaçao fdsda Português/Portuguese 7 15/01/2016 10:33 PM


All times are GMT. The time now is 11:44 AM.


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