[AJUDA]Sу Admin entrar em veнculo. -
.CrazZy._.[De] - 10.12.2011
Olб pessoal.
Entгo eu tava tentando arrumar este cуdigo, peguei daqui mesmo do fуrum, Daн eu tentei fazer do jeito que eu realmente quero. Sу que nгo funcionou =/.
Tipo, tem 3 veнculos que eu quero, que sу admin logado na rcon possa entrar.. se alguйm poder arrumar o cуdigo, fico grato.
pawn Код:
AdmCars[0] = CreateVehicle(446,945.00781250,-2126.42773438,0.00000000,345.51403809,-1,-1,15); //Squalo
AdmCars[1] = CreateVehicle(446,940.17187500,-2145.98144531,0.00000000,345.51403809,-1,-1,15); //Squalo
AdmCars[2] = CreateVehicle(487,972.73339844,-2138.79833984,13.49535942,98.00000000,-1,1,15);//Maverick
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for(new i = 0; i < sizeof(AdmCars); i ++)
{
if(vehicleid == AdmCars[i])
{
if(!IsPlayerAdmin(playerid)) return RemovePlayerFromVehicle(playerid);
{
SendClientMessage(playerid,Vermelho,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й ADM.");
TogglePlayerControllable(playerid, 1);
}
}
}
return 1;
}
Re: [AJUDA]Sу Admin entrar em veнculo. -
Macintosh - 10.12.2011
pawn Код:
AdmCars[0] = CreateVehicle(446,945.00781250,-2126.42773438,0.00000000,345.51403809,-1,-1,15); //Squalo
AdmCars[1] = CreateVehicle(446,940.17187500,-2145.98144531,0.00000000,345.51403809,-1,-1,15); //Squalo
AdmCars[2] = CreateVehicle(487,972.73339844,-2138.79833984,13.49535942,98.00000000,-1,1,15);//Maverick
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if( vehicleid == AdmCars[ 0 ] || vehicleid == AdmCars[ 1 ] || vehicleid == AdmCars[ 2 ] )
{
if( !IsPlayerAdmin( playerid ) )
{
RemovePlayerFromVehicle( playerid );
SendClientMessage( playerid, Vermelho, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й ADM." );
TogglePlayerControllable( playerid, 1 );
}
else
{
}
}
return 1;
}
Re: [AJUDA]Sу Admin entrar em veнculo. -
Cristhian - 10.12.2011
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
for(new i = 0; i < sizeof(AdmCars); i ++)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == AdmCars[i])
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,Vermelho,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й ADM.");
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}
tente
AW: [AJUDA]Sу Admin entrar em veнculo. -
.CrazZy._.[De] - 10.12.2011
@Macintosh
Sу aparece a mensagem quando o player entra, mais nгo tira ele do veнculo, mais mesmo assim Obrigado.
@Chistian
Deu certo, Vlw
.
Re: [AJUDA]Sу Admin entrar em veнculo. -
Macintosh - 10.12.2011
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if( vehicleid == AdmCars[ 0 ] || vehicleid == AdmCars[ 1 ] || vehicleid == AdmCars[ 2 ] )
{
if( !IsPlayerAdmin( playerid ) )
{
RemovePlayerFromVehicle( playerid );
SendClientMessage( playerid, Vermelho, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й ADM." );
TogglePlayerControllable( playerid, true );
return true;
}
else return true;
}
return true;
}