Morrer ao roubar
carro
Eficiente em server's de drift.
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid, 0xAA3333AA, "!!! Não roube carros ou morerá !!!");
if(!ispassenger && IsVehicleOccupied(vehicleid)) SetPlayerHealth(playerid, 0.0);
return 1;
}
Fim do Mode
pawn Code:
stock IsVehicleOccupied(vehicleid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
return 1;
return 0;
}
carro
Eficiente em server's de drift.
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid, 0xAA3333AA, "!!! Não roube carros ou morerá !!!");
if(!ispassenger && IsVehicleOccupied(vehicleid)) SetPlayerHealth(playerid, 0.0);
return 1;
}
Fim do Mode
pawn Code:
stock IsVehicleOccupied(vehicleid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
return 1;
return 0;
}