29.09.2013, 22:09
I made code that other gang can't use the cars of VIP gang, but I have a problem. When another gang enter in the VIP vehicle, you can drive.
GameModeInit:
OnPlayerEnterVehicle:
Please help
GameModeInit:
Код:
amxxbg[1] = AddStaticVehicle(409,1244.3000500,-2018.3000500,59.9000000,180.0000000,18,245); //Stretch etc.
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(GetPlayerVehicleID(playerid) == amxxbg[1] || GetPlayerVehicleID(playerid) == amxxbg[2] || GetPlayerVehicleID(playerid) == amxxbg[3] || GetPlayerVehicleID(playerid) == amxxbg[4] || GetPlayerVehicleID(playerid) == amxxbg[5] || GetPlayerVehicleID(playerid) == amxxbg[6] || GetPlayerVehicleID(playerid) == amxxbg[7] || GetPlayerVehicleID(playerid) == amxxbg[8] || GetPlayerVehicleID(playerid) == amxxbg[9] || GetPlayerVehicleID(playerid) == amxxbg[10] || GetPlayerVehicleID(playerid) == amxxbg[11] || GetPlayerVehicleID(playerid) == amxxbg[12] || GetPlayerVehicleID(playerid) == amxxbg[13] || GetPlayerVehicleID(playerid) == amxxbg[14] || GetPlayerVehicleID(playerid) == amxxbg[15] || GetPlayerVehicleID(playerid) == amxxbg[16] || GetPlayerVehicleID(playerid) == amxxbg[17] || GetPlayerVehicleID(playerid) == amxxbg[18] || GetPlayerVehicleID(playerid) == amxxbg[19] || GetPlayerVehicleID(playerid) == amxxbg[20] || GetPlayerVehicleID(playerid) == amxxbg[21] || GetPlayerVehicleID(playerid) == amxxbg[22] || GetPlayerVehicleID(playerid) == amxxbg[23] || GetPlayerVehicleID(playerid) == amxxbg[24]) { 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; }