new VCV[11]; //O CV TEM CARROS
VCV[0] = CreateVehicle(567,2166.9192,-1808.8960,13.2744,1.8027,3,3,60000); // carro CV 6
VCV[1] = CreateVehicle(480,2162.8418,-1808.9608,13.1587,355.8469,3,3,60000); // carro CV 7
VCV[2] = CreateVehicle(533,2170.3511,-1808.2281,13.0954,356.7516,3,3,60000); // carro CV 8
VCV[3] = CreateVehicle(487,2140.4653,-1811.3521,18.8720,359.0771,3,3,60000); // heli CV
VCV[4] = CreateVehicle(581,2152.4373,-1791.9607,13.0896,265.8248,3,3,60000); // moto CV 1
VCV[5] = CreateVehicle(581,2152.4802,-1794.4839,13.1161,271.8142,3,3,60000); // moto CV 2
VCV[6] = CreateVehicle(560,2170.0002,-1793.9656,13.1749,178.4637,3,3,60000); // carro CV 2
VCV[7] = CreateVehicle(560,2159.1633,-1808.6270,13.0691,359.6226,3,3,60000); // carro CV 3
VCV[8] = CreateVehicle(559,2161.1936,-1793.8085,13.0271,178.9899,3,3,60000); // carro CV 4
VCV[9] = CreateVehicle(562,2165.2068,-1793.7007,13.0222,177.9311,3,3,60000); // carro CV 5
VCV[10] = CreateVehicle(424,2173.9265,-1808.1708,13.1515,0.4743,3,3,60000); // carro CV 1
,
stock GetOrgName(orgid)
{
new str[30];
if(orgid == 0)
{
str = "Civil";
}
if(orgid == 1)
{
str = "Comando Vermelho";
}
if(orgid == 2)
{
str = "P.C.C";
}
if(orgid == 3)
{
str = "Ballas";
}
if(orgid == 4)
{
str = "Groove Street";
}
if(orgid == 5)
{
str = "Los Vagos";
}
return str;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 1 || vehicleid == 2 || vehicleid == 3)
{
if(PlayerData[playerid][pOrg] != ORG_POLICIAL)
{
new Float:cPos[3];
GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
SetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
SendClientMessage(playerid, -1, "Esse veнculo й da org de Policial.");
}
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for(new i = 1; i != 3; ++i)
{
if(vehicleid == i)
{
if(PlayerData[playerid][pOrg] != ORG_POLICIAL)
{
new Float:cPos[3];
GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
SetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
SendClientMessage(playerid, -1, "Esse veнculo й da org de Policial.");
}
}
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i; i != sizeof(VCV); ++i)
{
if(GetPlayerVehicleID(playerid) == VCV[i])
{
if(Player[playerid][Org] != ComandoVermelho)
{
ClearAnimations(playerid);
SendClientMessage(playerid, Vermelho, "| ERRO | Este veнculo estб reservado apenas para os membros do Comando Vermelho!");
break;
}
}
}
}
return 1;
}
PHP Code:
|
Nгo sei se vocк quer algo do tipo, mas vamos lб.
Pode ser feito de duas maneiras: 1 PHP Code:
PHP Code:
|
https://sampforum.blast.hk/showthread.php?tid=301128
/\ Pode ser util para vocк aprender um pouco mais . |