Jump to content

Question

Posted

salut,am un server de Trucking ,vreau sa ma ajute cineva cu radarele ,deci uite cum sta treaba Cind ma prinde radarul imi zice Ai fost prins de radar si incetineste,dar eu vreau cind te prinde sa arate viteza ta si limita radarului am incercat tot felu de metode si cu fs de radare si tot nu merge ,deci uitativa cum fac eu nustiu daca e corect....(nu ma pricep in scripting)!!

#define TXT_PlayerCaughtSpeeding "{FF0000}Ai fost prins de radar .Viteza ta :%i .Limita:%i!!!!!!!"

nustiu daca am scris cv corect aici scz dar va zic nu ma pricep bn

3 answers to this question

Recommended Posts

Posted

// This function checks if the player is speeding near a speedcamera

CheckPlayerSpeeding(playerid)

{

// Setup local variables

new Name[24], Msg[128];

// 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, 50.0, ACameras[CamID][CamX], ACameras[CamID][CamY], ACameras[CamID][CamZ]))

{

    // 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

    SendClientMessage(playerid, 0xFFFFFFFF, TXT_PlayerCaughtSpeeding);

// Get the name of the player

GetPlayerName(playerid, Name, sizeof(Name));

// Also inform all police players that this player is caught speeding

format(Msg, 128, "{00FF00}Player {FFFF00}%s{00FF00} is caught speeding, pursue and fine him", Name);

Police_SendMessage(Msg);

}

}

}

    }

}

}

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]--;

}

ASa ceva alt cv nam gasit

Posted

Cauta prin gm

ACameras[CamID][CamSpeed]
si posteaza aici sa vedem cu cat e egal. Trebuie sa fie ceva de genul
ACameras[CamID][CamSpeed] >= x

bine`nteles ca x in gm`ul tau va fi egal cu  cifra !

A fost usor sa te iubim ...,

      Acum e imposibil sa te uitam !

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.