29.09.2013, 22:16
pawn Код:
bool:IsVipVehicle(vehicleid)
{
for(new i=0; i != sizeof(amxxbg); i++)
if(vehicleid == amxxbg[i])
return true;
return false;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsVipVehicle(vehicleid))
{
if(PlayerInfo[playerid][pMember] != TEAM_VIP)
{
new Float:shealth;
new Float:slx, Float:sly, Float:slz;
GetPlayerHealth(playerid, shealth);
SetPlayerHealth(playerid, shealth-5);
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx+2, sly, slz);
PlayerPlaySound(playerid, 1130, slx, sly, slz+5);
SendClientMessage(playerid, -1, "{808080}You can't drive VIP Gang vehicles");
}
}
return 1;
}
Use zPain code is better