parece simples mas estou bugando como faco para Proibir ids de entrar no veiculo menos quem digitou o comando
PHP Code:
CMD:marcarcarro(playerid)
{
// anti bugs
if( Marcado[playerid] == true )
return SendClientMessage(playerid, -1, "<!> voce ja marcou um carro");
new ran = random(3);
new rand = random( sizeof(CarrosRoubo) );
SetPlayerCheckpoint(playerid, CarrosRoubo[rand][0], CarrosRoubo[rand][1], CarrosRoubo[rand][2], 3);
if (ran == 0)
carro_roubo[playerid] = AddStaticVehicle(410, CarrosRoubo[rand][0], CarrosRoubo[rand][1], CarrosRoubo[rand][2], CarrosRoubo[rand][3], 1, 1);
MotorQuebrado[carro_roubo[playerid]] = false;
if (ran == 1)
carro_roubo[playerid] = AddStaticVehicle(478, CarrosRoubo[rand][0], CarrosRoubo[rand][1], CarrosRoubo[rand][2], CarrosRoubo[rand][3], 1, 1);
MotorQuebrado[carro_roubo[playerid]] = false;
if (ran == 2)
carro_roubo[playerid] = AddStaticVehicle(402, CarrosRoubo[rand][0], CarrosRoubo[rand][1], CarrosRoubo[rand][2], CarrosRoubo[rand][3], 1, 1);
MotorQuebrado[carro_roubo[playerid]] = false;
SendClientMessage(playerid, VERDE_CLARO, "*Veiculo marcado no mapa va ate a localizacao e faca o roubo");
Marcado[playerid] = true;
return 1;
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid, VERDE_CLARO, "* Para ligar o motor use: /motor ou aperte 'Y'.");
UltimoVeiculo[playerid] = vehicleid;
if( vehicleid == carro_roubo[playerid] )
{
/* if( Player[playerid][pEmprego] != LadraoCarros )
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, LARANJA, "[VS:RP] Voce nao tem a chave desse veiculo!");
}*/
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, -1, "*Foi marcado no mapa o local de venda do veiculo leve ate la.");
SetPlayerCheckpoint(playerid, -1708.3495,10.3581,3.3864, 2);
}
}