[Ajuda] Estacionamento Vip
#1

Olб Pessoal Criei um mapa de estacionamento para vips, e com algumas ajudas do pessoal aqui consegui colocar o comando do portгo sou noob em pawno, Mas tipo eu queria que o portгo abrisse ao buzinar e os carros fossem liberados apenas para vips, se vocкs puderem me ajudar ficarei muitнssimo grato e Obrigado dкs de Jб.


Se Precisarem Aqui estб o Pawn


Quote:
pawn Код:
#include <a_samp>

new Portao;

#define COLOR_RED                0xAA3333AA
#define COLOR_GREEN              0x33AA33AA

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

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

#endif

public OnGameModeInit()
{
//===================================================================================================================
                AddStaticVehicleEx(603,1560.6752,-2308.8251,13.3847,89.7603,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.6705,-2312.1889,13.3851,90.0159,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.6695,-2315.4543,13.3858,90.3470,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.5975,-2318.7077,13.3869,90.4286,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.5722,-2322.0429,13.3872,90.0234,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.5582,-2325.2968,13.3868,91.6376,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.5460,-2328.5771,13.3868,91.2366,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.5727,-2331.8737,13.3865,91.1397,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.6219,-2335.1589,13.3850,90.4296,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1560.6428,-2338.4057,13.3850,89.9542,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1556.1920,-2361.2795,13.3926,358.7655,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1552.8095,-2361.3000,13.3926,0.8178,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1549.4101,-2361.4143,13.3603,359.5743,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1546.2360,-2361.4167,13.3926,359.6683,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1542.9621,-2361.4099,13.3926,0.1327,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1539.7258,-2361.3950,13.3926,1.2470,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1536.3930,-2361.3400,13.3926,0.9429,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1533.0325,-2361.3640,13.3928,0.8261,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1529.8009,-2361.3803,13.3927,0.0713,-1,-1,-1);//Phoenix
                AddStaticVehicleEx(603,1526.4805,-2361.3305,13.3926,358.9965,-1,-1,-1);//Phoenix
//===================================================================================================================
                CreateObject(987,1565.90002441,-2308.19995117,12.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (2)
                CreateObject(987,1565.90002441,-2320.10009766,12.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (4)
                CreateObject(987,1566.00000000,-2331.80004883,12.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (5)
                CreateObject(987,1565.90002441,-2343.69995117,12.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (7)
                CreateObject(987,1565.90002441,-2355.69995117,12.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (8)
                CreateObject(987,1566.00000000,-2367.69995117,12.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (10)
                CreateObject(987,1554.30004883,-2368.00000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (11)
                CreateObject(987,1542.30004883,-2368.00000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (12)
                CreateObject(987,1530.30004883,-2368.10009766,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (14)
                CreateObject(987,1518.30004883,-2368.10009766,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (15)
                CreateObject(987,1506.50000000,-2367.89990234,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (16)
                CreateObject(987,1494.50000000,-2367.89990234,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (18)
                CreateObject(987,1484.40002441,-2367.89990234,12.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (19)
                CreateObject(987,1484.50000000,-2356.30004883,12.50000000,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (20)
                CreateObject(987,1484.50000000,-2344.30004883,12.50000000,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (21)
                CreateObject(987,1484.59997559,-2342.39990234,12.50000000,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (22)
                CreateObject(987,1496.19995117,-2340.39990234,12.50000000,0.00000000,0.00000000,190.00000000); //object(elecfence_bar) (23)
                CreateObject(987,1508.09997559,-2340.30004883,12.50000000,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (24)
                CreateObject(987,1520.09997559,-2340.30004883,12.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (25)
                CreateObject(987,1532.00000000,-2340.30004883,12.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (26)
                CreateObject(987,1538.19995117,-2340.50000000,12.50000000,0.00000000,0.00000000,177.99450684); //object(elecfence_bar) (27)
                CreateObject(987,1538.50000000,-2328.80004883,12.50000000,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (28)
                CreateObject(987,1538.50000000,-2316.89990234,12.50000000,0.00000000,0.00000000,269.98901367); //object(elecfence_bar) (29)
                CreateObject(987,1538.40002441,-2307.80004883,12.50000000,0.00000000,0.00000000,269.98901367); //object(elecfence_bar) (30)
                CreateObject(987,1538.30004883,-2296.69995117,12.50000000,0.00000000,0.00000000,269.98901367); //object(elecfence_bar) (31)
                CreateObject(987,1565.69995117,-2296.60009766,12.60000038,0.00000000,0.00000000,179.98901367); //object(elecfence_bar) (32)
                Portao = CreateObject(980,1547.677,-2296.252,15.544,0.000,0.000,0.000); //object(portгo) (1)
                CreateObject(1324,1542.19995117,-2295.39990234,14.00000000,0.00000000,0.00000000,68.00000000 ); //object(ws_roadwarning_04) (1)
                CreateObject(3881,1562.50000000,-2301.69995117,14.39999962,0.00000000,0.00000000,0.00000000 ); //object(airsecbooth_sfse) (1)
                CreateObject(3749,1547.890,-2297.051,18.548,0.000,0.000,0.000); //object(clubgate01_lax) (1)

                return 1;
                }
//===================================================================================================================
                public OnPlayerCommandText(playerid, cmdtext[])
{

//----------------------------
    if (strcmp("/abrirvip", cmdtext, true, 10) == 0)
    {
  if(!IsPlayerAdmin(playerid))
        {
            MoveObject(Portao, 1548.181,-2296.253,9.544, 5.0);
            SendClientMessage(playerid, COLOR_GREEN, "Portгo do Estacionamento Vip Aberto");
            return 1;
        }
    }
//===================================================================================================================
    if (strcmp("/fecharvip", cmdtext, true, 10) == 0)
    {
  if(!IsPlayerAdmin(playerid))
        {
            MoveObject(Portao, 1547.677,-2296.252,15.544, 5.0);
            SendClientMessage(playerid, COLOR_RED, "Portгo do Estacionamento Vip Fechado");
            return 1;
        }
    }
    return 0;
}
//===================================================================================================================



Reply
#2

bom sу para vips usarem voce teria q ter um sistema de vip... caso vc nao tenha eu nao saberei ajudar voc pois sou iniciante tbm
olha ai tem o code pro portao abrir testa ai fiz aqui mesmo e pro portao fechar eu nao sei
mais aqui nesse link й um tutu e quando a pessoa vai pra longe do porta fecha sozim se vc conseguir entender https://sampforum.blast.hk/showthread.php?tid=360789
bom й isso ai fui se voc usar um sistema de vip me passa um comando dele que eu falo como faz suav

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & 2)
{
if (strcmp("/abrirvip", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid))
{
MoveObject(Portao, 1548.181,-2296.253,9.544, 5.0);
SendClientMessage(playerid, COLOR_GREEN, "Portгo do Estacionamento Vip Aberto");
return 1;
}
Reply
#3

Quote:
Originally Posted by Math3us
Посмотреть сообщение
bom sу para vips usarem voce teria q ter um sistema de vip... caso vc nao tenha eu nao saberei ajudar voc pois sou iniciante tbm
olha ai tem o code pro portao abrir testa ai fiz aqui mesmo e pro portao fechar eu nao sei
mais aqui nesse link й um tutu e quando a pessoa vai pra longe do porta fecha sozim se vc conseguir entender https://sampforum.blast.hk/showthread.php?tid=360789
bom й isso ai fui se voc usar um sistema de vip me passa um comando dele que eu falo como faz suav

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & 2)
{
if (strcmp("/abrirvip", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid))
{
MoveObject(Portao, 1548.181,-2296.253,9.544, 5.0);
SendClientMessage(playerid, COLOR_GREEN, "Portгo do Estacionamento Vip Aberto");
return 1;
}
Encontrei esse nгo sei se pode ajudar.
Quote:

if(strcmp(tmp, "vender", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
return true;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return true;
}
if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo]][cOwner], true) == 0)
{
new car = PlayerInfo[playerid][pVeiculo];
CarInfo[car][cOwned] = 0;
CarInfo[car][cModel] = 560;
CarInfo[car][cColorOne] = 0;
CarInfo[car][cColorTwo] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicleEx(playerid);
Controle(playerid, 1);
PlayerInfo[playerid][pCarKey] = 0;
PlayerInfo[playerid][pVeiculo] = 0;
SaveCars();
return true;
}

Reply
#4

pelo que entendi esse й a val que define se o player й vip ou nao
pawn Код:
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
tenta ai coloca isso no comeзo do code...
Reply
#5

Quote:
Originally Posted by Math3us
Посмотреть сообщение
pelo que entendi esse й a val que define se o player й vip ou nao
pawn Код:
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
tenta ai coloca isso no comeзo do code...
pawn Код:
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : warning 215: expression has no effect
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : error 029: invalid expression, assumed zero
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

//----------------------------
if (strcmp("/abrirvip", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
{
MoveObject(Portao, 1548.181,-2296.253,9.544, 5.0);
SendClientMessage(playerid, COLOR_GREEN, "Portгo do Estacionamento Vip Aberto");
return 1;
}
}
//================================================== ================================================== ===============
if (strcmp("/fecharvip", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
{
MoveObject(Portao, 1547.677,-2296.252,15.544, 5.0);
SendClientMessage(playerid, COLOR_RED, "Portгo do Estacionamento Vip Fechado");
return 1;
}
}
return 0;
}
assim talvez ?
Reply
#7

Quote:
Originally Posted by Math3us
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

//----------------------------
if (strcmp("/abrirvip", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
{
MoveObject(Portao, 1548.181,-2296.253,9.544, 5.0);
SendClientMessage(playerid, COLOR_GREEN, "Portгo do Estacionamento Vip Aberto");
return 1;
}
}
//================================================== ================================================== ===============
if (strcmp("/fecharvip", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
{
MoveObject(Portao, 1547.677,-2296.252,15.544, 5.0);
SendClientMessage(playerid, COLOR_RED, "Portгo do Estacionamento Vip Fechado");
return 1;
}
}
return 0;
}
assim talvez ?
Tб Dando os Mesmos Erros acima
Reply
#8

pawn Код:
if(PlayerInfo[playerid][pCarKey] == 0 )
tenta assim se nao der certo eu nao vo conseguir ajudar malz... tbm sou novato
Reply
#9

Quote:
Originally Posted by Math3us
Посмотреть сообщение
pawn Код:
if(PlayerInfo[playerid][pCarKey] == 0 )
tenta assim se nao der certo eu nao vo conseguir ajudar malz... tbm sou novato
TUDO BEM,AFF COMO Й RUIN SER NOOB, MAS ESPERO QUE ALGUЙM BEM ENTENDIDO POSSA ME AJUDAR, MAS VALEU O SEU ESFORЗO DEUS-LHE PAGUE.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)