[Ajuda] AJUDA NO PPC_TRUCKING DO +REP
#6

Quote:
Originally Posted by JoaoMonteiro452
Посмотреть сообщение
Vlw .. isso eu ei kkk', mas o tenso й fazer ele aparecer e desaparecer com a lуgica do radar :/




pawn Код:
// This function checks if the player is speeding near a speedcamera
CheckPlayerSpeeding(playerid)
{
    // Setup local variables
    new Name[28], Msg[128], Msgg[128], location[MAX_ZONE_NAME], targetid;

    // Check if the player hasn't been caught speeding recently
    if (APlayerData[playerid][PlayerCaughtSpeeding] == 0)
    {
        // Loop through all speedcameras
        for (new CamID; CamID < MAX_CAMERAS; CamID++)
        {
            // Check if this camera has been created
            if (ACameras[CamID][CamSpeed] != 0)
            {
                // Check if the player is the driver of the vehicle
                if (GetPlayerVehicleSeat(playerid) == 0)
                {
                    // Check if the player's speed is greater than the speed allowed by this camera (no need to process a distance-check if not speeding)
                    if (APlayerData[playerid][PlayerSpeed] > ACameras[CamID][CamSpeed])
                    {
                        // Check if the player is near the camera
                        if (IsPlayerInRangeOfPoint(playerid, 40.0, ACameras[CamID][CamX], ACameras[CamID][CamY], ACameras[CamID][CamZ]))
                        {
                            new Ha[128];
                            // Prevent the player being caught multiple times by the same speed-camera
                            APlayerData[playerid][PlayerCaughtSpeeding] = 20;
                            // Increase the wanted-level of this player by 1 star
                            SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
                            // Let the player know he's been caught speeding
                            format(Ha, sizeof(Ha), "[Radar] {FF0000}Vocк foi flagrado a: {FFFFFF}%i Km/h {FF0000}[Permitido: {FFFFFF}%i{FF0000}].", APlayerData[playerid][PlayerSpeed], ACameras[CamID][CamSpeed]);
                            SendClientMessage(playerid, -1, Ha);
                            // Get the name of the player
                            GetPlayerName(playerid, Name, sizeof(Name));
                            GetPlayer2DZonea(targetid, location, MAX_ZONE_NAME);
                            // Also inform all police players that this player is caught speeding
                            format(Msg, 128, "[Radar] %s {FF0000}foi flagrado em alta velocidade pelo {FFFFFF}radar!", Name);
                            format(Msgg, 128, "[Local] {FF0000}Visto pela ultima vez proximo de: {FFFFFF}%s", location);
                            Police_SendMessage(Msg);
                            Police_SendMessage(Msgg);
                        }
                    }
                }
            }
        }
    }
    else // If the player has been caught before, reduce the value until it's 0 again, then he can be caught again
        APlayerData[playerid][PlayerCaughtSpeeding]--;
}
Adoro sua maneira de falar... vlw por ter ajduado kkkkk', porque realmente isso nгo tem lуgica o que eu fiz kkkkkkkkkkkkkkkkkkkk'
Falou que ia dar +rep no tнtulo, atй agora nada...
Reply


Messages In This Thread
AJUDA NO PPC_TRUCKING DO +REP - by JoaoMonteiro452 - 03.11.2013, 13:44
Re: AJUDA NO PPC_TRUCKING DO +REP - by Locky_ - 03.11.2013, 14:17
Respuesta: AJUDA NO PPC_TRUCKING DO +REP - by ViniKuliveguisky - 03.11.2013, 14:21
Re: Respuesta: AJUDA NO PPC_TRUCKING DO +REP - by JoaoMonteiro452 - 03.11.2013, 14:27
Re: AJUDA NO PPC_TRUCKING DO +REP - by Schocc - 03.11.2013, 14:52
Re: Respuesta: AJUDA NO PPC_TRUCKING DO +REP - by Locky_ - 03.11.2013, 14:56
Re: Respuesta: AJUDA NO PPC_TRUCKING DO +REP - by JoaoMonteiro452 - 03.11.2013, 15:06
Re: Respuesta: AJUDA NO PPC_TRUCKING DO +REP - by Locky_ - 03.11.2013, 15:14
Re: AJUDA NO PPC_TRUCKING DO +REP - by CharlieBrown - 03.11.2013, 15:31

Forum Jump:


Users browsing this thread: 4 Guest(s)