01.12.2014, 17:51
Tipo Assim Galera, Eu Compro meu Carro Vip, Ai Assim q Eu Entro e tento Da "/veiculo trancar" Diz Q Esse Nao й Meu Veiculo Vip Ajuda Pfv'
Codigo Abaixo
Codigo Abaixo
pawn Код:
if(strcmp(tmp, "trancar", true) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return 1;
}
new keycar;
if(vehid == PlayerInfo[playerid][pCarKey]) { keycar = PlayerInfo[playerid][pVeiculo]; }
else if(vehid == PlayerInfo[playerid][pCarKey2]) { keycar = PlayerInfo[playerid][pVeiculo2]; }
if(IsPlayerConnected(playerid))
{
if(CarInfo[keycar][cLock] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(CarInfo[keycar][ownedvehicle],i,0,0);
}
format(string, sizeof(string), "~w~Veiculo VIP~n~~g~Aberto");
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, string, 10000, 3);
CarInfo[keycar][cLock] = 0;
return 1;
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(CarInfo[keycar][ownedvehicle],i,0,1);
}
format(string, sizeof(string), "~w~Veiculo VIP~n~~r~Trancado");
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, string, 10000, 3);
CarInfo[keycar][cLock] = 1;
return 1;
}
}
return 1;
}