[Ajuda] Emprego de Prostituta
#1

Bom pessoal, no meu servidor tem um emprego de Prostituta, eu queria saber se tem como eu fazer o carro balaзar como no GTA Offline. Vou mandar o cуdigo do comando /transar.
PHP код:
    CMD:transar(playeridparams[])
    {
            if(
PlayerInfo[playerid][pEmprego] == 3)
            {
                if(!
IsPlayerInAnyVehicle(playerid))
                {
                    
SendClientMessage(playeridCOLOR_GREY"   Vocк sу pode transar em um carro !");
                    return 
true;
                }
                new 
Car GetPlayerVehicleID(playerid), money;
                if(
sscanf(params"ud"giveplayeridmoney))
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"USE: /transar [id] [price]");
                    return 
true;
                }
                if(
money || money 20000) { SendClientMessage(playeridCOLOR_GREY"   Preзo da transa nгo pode ser menor que R$1, ou maior que R$20000!"); return true; }
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if (
ProxDetectorS(8.0playeridgiveplayerid))
                        {
                            if(
GetPlayerMoney(giveplayerid) < money)
                                return 
SendClientMessage(playeridCOLOR_GRAD1"   Este jogador nгo tem dinheiro suficiente !");
                            if(
giveplayerid == playerid) { SendClientMessage(playeridCOLOR_GREY"Vocк nгo pode ter relaзгo sexual com vocк mesma, mais pode bater uma siririca!"); return true; }
                            if(
IsPlayerInAnyVehicle(playerid) && IsPlayerInVehicle(giveplayeridCar))
                            {
                                new 
string[128];
                                
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                                
GetPlayerName(playeridsendernamesizeof(sendername));
                                
format(stringsizeof(string), "* Vocк ofereceu ao %s para dar uma *Foda* com vocк por R$%d."giveplayermoney);
                                
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                                
format(stringsizeof(string), "* Profissional do sexo %s Perguntou se vocк aceita dar uma *Foda*, por R$%d (Digite /aceitar transa) Para Aceitar."sendernamemoney);
                                
SendClientMessage(giveplayeridCOLOR_LIGHTBLUEstring);
                                
SexOffer[giveplayerid] = playerid;
                                
SexPrice[giveplayerid] = money;
                            }
                            else
                            {
                                
SendClientMessage(playeridCOLOR_GREY"   Vocк e o seu cliente devem estar juntos em um carro !");
                                return 
true;
                            }
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_GREY"   Este jogador nгo estб perto de vocк !");
                            return 
true;
                        }
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"   O Jogador estб offline !");
                    return 
true;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo й Profissional do sexo !");
            }
            return 
true;
    } 
Comando de aceitar:
PHP код:
            else if(strcmp(x_Emprego,"transa",true) == 0)
            {
                if(
SexOffer[playerid] < 999)
                {
                    if(
GetPlayerMoney(playerid) > SexPrice[playerid])
                      {
                        if (
IsPlayerConnected(SexOffer[playerid]))
                        {
                            new 
Car GetPlayerVehicleID(playerid);
                            if(
IsPlayerInAnyVehicle(playerid) && IsPlayerInVehicle(SexOffer[playerid], Car))
                            {
                                
GetPlayerName(SexOffer[playerid], giveplayersizeof(giveplayer));
                                
GetPlayerName(playeridsendernamesizeof(sendername));
                                
format(stringsizeof(string), "* Vocк fez sexo com a profissional do sexo %s, por R$%d."giveplayerSexPrice[playerid]);
                                
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                                
format(stringsizeof(string), "* %s teve relaзхes sexuais com vocк, R$%d foi adicionado em seu salбrio."sendernameSexPrice[playerid]);
                                
SendClientMessage(SexOffer[playerid], COLOR_LIGHTBLUEstring);
                                
PlayerInfo[SexOffer[playerid]][pSalario] += SexPrice[playerid];
                                
GivePlayerMoney(playerid, -SexPrice[playerid]);
                                
PlayerInfo[SexOffer[playerid]][pSexSkill] ++;
                                if(
PlayerInfo[SexOffer[playerid]][pSexSkill] == 50)
                                { 
SendClientMessage(SexOffer[playerid], COLOR_YELLOW"* Seu nнvel de sexo agora й 2, e pode oferecer uma melhor Sexo (saъde) e menos chance de DST."); }
                                else if(
PlayerInfo[SexOffer[playerid]][pSexSkill] == 100)
                                { 
SendClientMessage(SexOffer[playerid], COLOR_YELLOW"* Seu nнvel de sexo agora й 3, e pode oferecer uma melhor Sexo (saъde) e menos chance de DST."); }
                                else if(
PlayerInfo[SexOffer[playerid]][pSexSkill] == 200)
                                { 
SendClientMessage(SexOffer[playerid], COLOR_YELLOW"* Seu nнvel de sexo agora й 4, e pode oferecer uma melhor Sexo (saъde) e menos chance de DST."); }
                                else if(
PlayerInfo[SexOffer[playerid]][pSexSkill] == 400)
                                { 
SendClientMessage(SexOffer[playerid], COLOR_YELLOW"* Seu nнvel de sexo agora й 5, e pode oferecer uma melhor Sexo (saъde) e menos chance de DST."); }
                                if(
PlayerInfo[playerid][pDoenca] == 0)
                                {
                                    if(
Condom[playerid] < 1)
                                    {
                                        new 
Float:health;
                                        new 
level PlayerInfo[SexOffer[playerid]][pSexSkill];
                                        if(
level >= && level <= 50)
                                        {
                                            if(
GetPlayerHealth(playeridhealth) < 80) {
                                            
SetPlayerHealth(playeridhealth 20.0); } else { SetPlayerHealth(playerid100.0); }
                                            new 
rand random(sizeof(STD1));
                                            
PlayerInfo[playerid][pDoenca] = STD1[rand];
                                            
PlayerInfo[SexOffer[playerid]][pDoenca] = STD1[rand];
                                            if(
STD1[rand] == 0) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 20 de Saъde e nгo pegou nenhuma DST durante o sexo."); }
                                            else if(
STD1[rand] == 1) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 20 de Saъde + uma Pereba no CU devido ao sexo."); }
                                            else if(
STD1[rand] == 2) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 20 de Saъde + uma Duenca na Cabeca do Pau devido ao sexo."); }
                                            else if(
STD1[rand] == 3) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 20 de Saъde + uma Duenca na Buceta devido ao sexo."); }
                                        }
                                        else if(
level >= 51 && level <= 100)
                                        {
                                            if(
GetPlayerHealth(playeridhealth) < 60) {
                                            
SetPlayerHealth(playeridhealth 40.0); } else { SetPlayerHealth(playerid100.0); }
                                            new 
rand random(sizeof(STD2));
                                            
PlayerInfo[playerid][pDoenca] = STD2[rand];
                                            
PlayerInfo[SexOffer[playerid]][pDoenca] = STD2[rand];
                                            if(
STD2[rand] == 0) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 40 de Saъde e nгo pegou nenhuma DST durante o sexo."); }
                                            else if(
STD2[rand] == 1) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 40 de Saъde + um Pereba no CU devido ao Sexo."); }
                                            else if(
STD2[rand] == 2) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 40 de Saъde + um Duenca na Cabeca do Pau devido ao Sexo."); }
                                            else if(
STD2[rand] == 3) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 40 de Saъde + uma Duenca na Buceta devido ao Sexo."); }
                                        }
                                        else if(
level >= 101 && level <= 200)
                                        {
                                            if(
GetPlayerHealth(playeridhealth) < 40) {
                                            
SetPlayerHealth(playeridhealth 60.0); } else { SetPlayerHealth(playerid100.0); }
                                            new 
rand random(sizeof(STD3));
                                            
PlayerInfo[playerid][pDoenca] = STD3[rand];
                                            
PlayerInfo[SexOffer[playerid]][pDoenca] = STD3[rand];
                                            if(
STD3[rand] == 0) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 60 de Saъde e nгo pegou nenhuma DST durante o sexo."); }
                                            else if(
STD3[rand] == 1) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 60 de Saъde + um Pereba no CU devido ao Sexo."); }
                                            else if(
STD3[rand] == 2) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 60 de Saъde + um Duenca na Cabeca do Pau devido ao Sexo."); }
                                            else if(
STD3[rand] == 3) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 60 de Saъde + uma Duenca na Buceta devido ao Sexo."); }
                                        }
                                        else if(
level >= 201 && level <= 400)
                                        {
                                            if(
GetPlayerHealth(playeridhealth) < 20) {
                                            
SetPlayerHealth(playeridhealth 80.0); } else { SetPlayerHealth(playerid100.0); }
                                            new 
rand random(sizeof(STD4));
                                            
PlayerInfo[playerid][pDoenca] = STD4[rand];
                                            
PlayerInfo[SexOffer[playerid]][pDoenca] = STD4[rand];
                                            if(
STD4[rand] == 0) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 80 de Saъde + DST enquanto nгo ter relaзхes sexuais."); }
                                            else if(
STD4[rand] == 1) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 80 de Saъde + um Pereba no CU devido ao Sexo."); }
                                            else if(
STD4[rand] == 2) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 80 de Saъde + um Duenca na Cabeca do Pau devido ao Sexo."); }
                                            else if(
STD4[rand] == 3) { SendClientMessage(playeridCOLOR_LIGHTBLUE"* Ganhou 80 de Saъde + uma Duenca na Buceta devido ao Sexo."); }
                                        }
                                        else if(
level >= 401)
                                        {
                                            
SetPlayerHealth(playerid100.0);
                                            
SendClientMessage(playeridCOLOR_LIGHTBLUE"* Seu nнvel de sexo й tгo alto que vocк ganhou 100% de saъde e nenhuma DST.");
                                            
SendClientMessage(SexOffer[playerid], COLOR_LIGHTBLUE"* A Prostitura tem um nнvel de sexo tгo alto que vocк ganhou 100% de saъde e nenhuma DST.");
                                        }
                                      }
                                    else
                                    {
                                        
SendClientMessage(SexOffer[playerid], COLOR_LIGHTBLUE"* O Jogador usou camisinha.");
                                        
SendClientMessage(playeridCOLOR_LIGHTBLUE"* Vocк estб usando camisinha.");
                                        
Condom[playerid] --;
                                    }
                                }
                                else
                                {
                                    
SendClientMessage(SexOffer[playerid], COLOR_LIGHTBLUE"* Este jogador jб estб infectado com DST, no pode pegar mais uma.");
                                    return 
true;
                                }
                                
SexOffer[playerid] = 999;
                                return 
true;
                            }
                            else
                            {
                                
SendClientMessage(playeridCOLOR_GREY"   Vocк ou a Profissional do sexo nгo estгo em um carro !");
                                return 
true;
                            }
                        }
//Connected ou not
                        
return true;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo pode pagar o sexo!");
                        return 
true;
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo tem nenhuma oferta de sexo !");
                    return 
true;
                }
            } 
Reply
#2

Balanзar mesmo nгo tem como. O que vocк pode fazer й criar um movimento usando SetVehiclePos, mas ficaria um movimento nгo muito bom.

O que poderia ser feito como alternativa seria posicionar a cвmera prуximo ao carro e ficar movendo.
Reply
#3

Olб, vocк poderб utilizar a funзгo Drunk como opзгo.
Animaзгo onde o personagem fica bкbado, e fazк-la ocorrer a seu gosto. Verificando se o usuбrio estб dentro do veнculo com um passageiro.

Faz a tela balanзar:
PHP код:
SetPlayerDrunkLevel(playerid50000); 
Faz a tela parar de balanзar:
PHP код:
SetPlayerDrunkLevel(playerid0); 
Espero que possa ser ъtil!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)