public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetPlayerVehicleID(playerid) == 497||596||597||598||599)
{
if(sapd[playerid]<=0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_RED,"You are not part of the Sanandreas Police Department.");
SendClientMessage(playerid,COLOR_RED,"The police has spotted you on the security camera. Get away before you get arrested!");
}
}
return 1;
}
if(GetPlayerVehicleID(playerid) == 497||596||597||598||599)
if(GetPlayerVehicleID(playerid) == 497 || GetPlayerVehicleID(playerid) == 596 || /*etc*/)
if(ispassenger == 1)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 497 || /*etc*/)
#define v GetVehicleModel(GetPlayerVehicleID(playerid))
if(v == 497 || v == 596 || /*etc*/)
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if((GetVehicleModel(GetPlayerVehicleID(playerid)) == 497 || (GetVehicleModel(GetPlayerVehicleID(playerid)) == 596||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 597 ||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 598 ||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 599) { if(sapd[playerid]<=0) { new Float:pX,Float:pY,Float:pZ GetPlayerPos(playerid,pX,pY,pZ); SetPlayerPos(playerid,pX,pY,pZ); SendClientMessage(playerid,COLOR_RED,"You are not part of the Sanandreas Police Department."); SendClientMessage(playerid,COLOR_RED,"The police has spotted you on the security camera. Get away before you get arrested!"); } } return 1;
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(playerid) == 497 || GetVehicleModel(playerid) == 596 ||GetVehicleModel(playerid) == 597 ||GetVehicleModel(playerid) == 598 ||GetVehicleModel(playerid) == 599)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(sapd[playerid]==0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_RED,"You are not part of the Sanandreas Police Department.");
SendClientMessage(playerid,COLOR_RED,"The police has spotted you on the security camera. Get away before you get arrested!");
}
}
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if((GetVehicleModel(GetPlayerVehicleID(playerid)) == 497 || (GetVehicleModel(GetPlayerVehicleID(playerid)) == 596||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 597 ||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 598 ||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 599)
{ //488
if(sapd[playerid]<=0) //489
{
new Float:pX,Float:pY,Float:pZ
GetPlayerPos(playerid,pX,pY,pZ);
SetPlayerPos(playerid,pX,pY,pZ);
SendClientMessage(playerid,COLOR_RED,"You are not part of the Sanandreas Police Department.");
SendClientMessage(playerid,COLOR_RED,"The police has spotted you on the security camera. Get away before you get arrested!");
}
}
}
return 1;
}
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if((GetVehicleModel(GetPlayerVehicleID(playerid)) == 497 || (GetVehicleModel(GetPlayerVehicleID(playerid)) == 596||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 597 ||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 598 ||(GetVehicleModel(GetPlayerVehicleID(playerid)) == 599) { if(sapd[playerid]<=0) { new Float:pX,Float:pY,Float:pZ GetPlayerPos(playerid,pX,pY,pZ); SetPlayerPos(playerid,pX,pY,pZ); SendClientMessage(playerid,COLOR_RED,"You are not part of the Sanandreas Police Department."); SendClientMessage(playerid,COLOR_RED,"The police has spotted you on the security camera. Get away before you get arrested!"); } } return 1; |