29.11.2009, 18:47
Add this at the top of the script:
Add this under OnGameModeInit / OnFilterScriptInit:
pawn Код:
new AdminCar;
pawn Код:
AdminCar = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (vehicleid == AdminCar && !ispassenger)
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,COLOR_WHITE, "Drive safe & set a good example!");
}
else
{
new Float:Xx,Float:Yy,Float:Zz,Float:Aa;
GetPlayerPos(playerid,Xx,Yy,Zz);
GetPlayerFacingAngle(playerid,Aa);
SetPlayerPos(playerid,Xx,Yy,Zz);
SetPlayerFacingAngle(playerid,Aa);
SendClientMessage(playerid,COLOR_WHITE, "You Can't drive this Vehicle!");
}