05.10.2012, 04:32
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[256];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s Entra no veiculo.", sendername);
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(Trancado[vehicleid] >= 1)
{
if(PlayerInfo[playerid][pAdmin] > 0 || ispassenger) { }
else
{
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,a);
SetPlayerPos(playerid, x, y, z+0.3);
SetPlayerFacingAngle(playerid, a);
SendClientMessage(playerid, COLOR_YELLOW, "Veiculo Trancado!");
}
}
return true;
}