new carroespecial[9];
//carroespecial
carroespecial[0] = CreateVehicle(463,294.0114,-1149.2913,80.4503,171.8302,6,6,999999999);
//Placas
SetVehicleNumberPlate(carroespecial[0], "Vip Pedro_Carpone");
if(vId==carroespecial[0])
{
new nome[24];
GetPlayerName(playerid, nome, sizeof nome);
if(strfind(nome, "Pedro_Carpone", true) == 0)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo a sua {9f9f9f}Moto {01b333}Pedro_Carpone{ffffff}.");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Moto{ffffff}Dono:{0082fb}Pedro_Carpone{ffffff}.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //Funзгo quando o player entra em um veiculo
{
//Implementa aqui, se o vehicleid for o carroespecial[0] e o nome do player nao for o do dono do carro, remove o player do veiculo
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new vId = GetPlayerVehicleID(playerid);
if(vId==carroespecial[0])
{
new nome[24];
GetPlayerName(playerid, nome, sizeof(nome));
if(strfind(nome, "Pedro_Carpone", true) == 0)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo a sua {9f9f9f}Moto {01b333}Pedro_Carpone{ffffff}.");
}
else
{
SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Moto{ffffff}Dono:{0082fb}Pedro_Carpone{ffffff}.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vId = GetPlayerVehicleID(playerid);
if(vId==carroespecial[0])
{
new nome[24];
GetPlayerName(playerid, nome, 24);
if(strfind(nome, "Pedro_Carpone", true) == 0)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo a sua {9f9f9f}Moto {01b333}Pedro_Carpone{ffffff}.");
}
else
{
SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Moto{ffffff}Dono:{0082fb}Pedro_Carpone{ffffff}.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
}
return 1;
}
pawn Код:
|
C:\Users\Pedro\Desktop\GTA San Andreas\BPP GM\gamemodes\BPP.pwn(19844) : error 017: undefined symbol "VehicleID"
C:\Users\Pedro\Desktop\GTA San Andreas\BPP GM\gamemodes\BPP.pwn(19852) : error 017: undefined symbol "VehicleID"
C:\Users\Pedro\Desktop\GTA San Andreas\BPP GM\gamemodes\BPP.pwn(19860) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
new vid = GetPlayerVehicleID(playerid);
if(VehicleID==carroespecial[0])
if(VehicleID==carroespecial[0])
return 1;
new bool:Entrar[MAX_PLAYERS] = false;
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vId = GetPlayerVehicleID(playerid);
if(vId==carroespecial[0])
{
new nome[24];
GetPlayerName(playerid, nome, 24);
if(strfind(nome, "Pedro_Carpone", true) == 0)
{
Entrar[playerid] = true;
InfoCarro(playerid);
}
else
{
Entrar[playerid] = true;
InfoCarro(playerid);
}
}
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
Entrar[playerid] = false;
return 1;
}
stock InfoCarro(playerid)
{
if(Entrar[playerid] == true)
SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo a sua {9f9f9f}Moto {01b333}Pedro_Carpone{ffffff}.");
else if(Entrar[playerid] == false)
SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Moto{ffffff}Dono:{0082fb}Pedro_Carpone{ffffff}.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
Tenta assim .
pawn Код:
|
Foi mal Pedro_BPP, acabei viajando no que eu tinha escrito, mais ja editei novamente, se tiver dando erro avise.
Abraзo. |
for(new i=0; i < sizeof(CarrosdosAmigos); i++)//Comeзo
if(ispassenger && vehicleid == CarrosdosAmigos[i]){
SetVehicleParamsForPlayer(CarrosdosAmigos[i],playerid,0,0);
}
else
if(vehicleid == CarrosdosAmigos[i] && PlayerInfo[playerid][pMember] < 23 && !ispassenger)
{
if(IsABike(GetVehicleModel(vehicleid)))
{
ApplyAnimation(playerid, "ped", "WALK_civi", 4.0, 1, 1, 1, 1, 1);
ClearAnimations(playerid);
SetVehicleParamsForPlayer(CarrosdosAmigos[i],playerid,0,1);
SendClientMessage(playerid, -1, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й dos Amigos dos Amigos.");
}
else
{
SetVehicleParamsForPlayer(CarrosdosAryan[i],playerid,0,1);
SendClientMessage(playerid, -1, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й dos Amigos dos Amigos.");
}
return 0;
}//Fim
new vId = GetPlayerVehicleID(playerid);
if(vId==carroespecial[0])
{
new nome[24];
GetPlayerName(playerid, nome, 24);
if (strcmp("Pedro_Carpone", Name, false) != 0)
{
SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Moto{ffffff}Dono:{0082fb}Pedro_Carpone{ffffff}.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
else SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo a sua {9f9f9f}Moto {01b333}Pedro_Carpone{ffffff}.");
}