if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 409)
ai colocaria um
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, VERMELHO_ESCURO, "Este Veiculo Pertence aos Motorista");
Vlws gente caso ajudar
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 409)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == Vehicle)
|
Hun ai no Caso do Bloqueio Eu enves de Colocar
pawn Код:
pawn Код:
|
//topo
new Veiculos[3];
//OnGameModeInit
Veiculos[1] = CreteVehicle(...
...
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == Veiculo[1] && VariavelProfissгo[playerid] == 0) return RemovePlayerFromVehicle(playerid);
return 1;
}
new Vehicle;
Vehicle = AddStaticVehicle(562,-2397.0630,-611.7119,132.3079,34.6049,3,3); // VeiculoProf
Compilando BCV.pwn...
C:\Documents and Settings\Murilo de sousa\Desktop\Brasil City Virtual RPG 0.3e\gamemodes\BCV.pwn(700) : warning 204: symbol is assigned a value that is never used: "Vehicle"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Compilando BCV.pwn...
C:\Documents and Settings\Murilo de sousa\Desktop\Brasil City Virtual RPG 0.3e\gamemodes\BCV.pwn(704) : error 032: array index out of bounds (variable "VeiculosDrifter")
C:\Documents and Settings\Murilo de sousa\Desktop\Brasil City Virtual RPG 0.3e\gamemodes\BCV.pwn(4022) : error 032: array index out of bounds (variable "VeiculosDrifter")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
|
exemplo:
pawn Код:
|
new Veiculos[3];
Veiculos[0] = AddStaticVehicle(562,-2397.0630,-611.7119,132.3079,34.6049,3,3); // VeiculoProf
Veiculos[1] = AddStaticVehicle(562,-2397.0630,-611.7119,132.3079,34.6049,3,3); // VeiculoProf
Veiculos[2] = AddStaticVehicle(562,-2397.0630,-611.7119,132.3079,34.6049,3,3); // VeiculoProf
|
Gustavo estб errado isso ...
Certo: pawn Код:
|
|
A utilizaзгo deste gйnero de pontuaзгo indica um pensamento ou ideia que ficou por terminar e que transmite, por parte de quem exprime esse conteъdo, reticкncia, omissгo de algo que podia ser escrito, mas que nгo й. |
if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 409)
{
if (Profissao[playerid] == Motorista)
{
TogglePlayerControllable(playerid, true);
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
new vid;
vid = GetPlayerVehicleID(playerid);
if (vid == Veiculos[1] || vid == Veiculos[2] || vid == Veiculos[3])
{
if (Profissao[playerid] == Motorista)
{
TogglePlayerControllable(playerid, true);
}
else
{
RemovePlayerFromVehicle(playerid);
}
}