20.12.2010, 08:58
ok...this is:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[256];
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "%s a intrat in vehicul.", plname);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(gTeam[playerid] >= 1||gTeam[playerid] >= 3||gTeam[playerid] >= 4)
{
if (IsACopCar(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3) {}
else {
WantedPoints[playerid]+=2;
SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
SetPlayerPos(playerid, cx, cy, cz);
new wanted = GetPlayerWantedLevel(playerid);
SetPlayerWantedLevel(playerid, wanted + 1);
}
}
if (IsAnAmbulance(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing An Ambulance"); }
}
}
return 1;
}