Ott van abba a linkbe amit a gyerek linkelt,hogy ha elolvasod lentebb
DOWNLOAD:
v1.0
www.infinite-gaming.com/iG_real_lights.zipv1.5
www.infinite-gaming.com/iG_real_lights_15.zipv2
www.infinite-gaming.com/iG_real_lights_2.zip.... Vagyis LETÖLTÉS.
Sok sikert remélem ez alapján le tudod tölteni...
Ha rámész a linkre akkor automatán letölti .
De ha igyse lenne jó.[pawn]/*************************************************
Infinite-Gaming.com Presents:
Real Vehicle Lights v.1.0 by Cyber_Punk
DO NOT REMOVE CREDITS
If you borrow bits of code would be nice to..
credit the original authors
Know issues (not script bugs)
Lights still will not flash in the day time,
Rear lights do not flash......
Hope for a samp fix in 0.3b code should still work
*************************************************/
#include <a_samp>
#define BLINK_RATE 500 // This is the rate of flash (also rate of timer in milliseconds)
#define LIGHT_KEY KEY_SUBMISSION // Set this to whatever key you want to turn the lights on
//Put MAX PLAYERS HERE (sorry its for the timer..)
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
// Macro from SAMP wiki Credits to the author
#define PRESSED(%0) \\
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new BlinkTime[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Infinite-Gaming.com Presents:\");
print(\" Real Vehicle Lights by Cyber_Punk\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
print(\"\\n--------------------------------------\");
print(\" Real Vehicle Lights UNLOADED\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(BlinkTime[playerid]);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new panels, doors, lights, tires;
GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
lights = encode_lights(1, 1, 1, 1);
SetPVarInt(playerid, \"vMainOn\", 0);
UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
BlinkTime[playerid] = SetTimerEx(\"vBlinker\", BLINK_RATE, 1, \"i\", playerid);
}
else if(newstate == PLAYER_STATE_ONFOOT)
{
KillTimer(BlinkTime[playerid]);
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(LIGHT_KEY))
{
new panels, doors, lights, tires;
GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
switch(GetPVarInt(playerid, \"vMainOn\"))
{
case 0:
{
lights = encode_lights(0, 0, 0, 0);
SetPVarInt(playerid, \"vMainOn\", 1);
}
case 1:
{
lights = encode_lights(1, 1, 1, 1);
SetPVarInt(playerid, \"vMainOn\", 0);
}
}
UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
}
return 1;
}
forward vBlinker(playerid);
public vBlinker(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Keys, ud, lr, panels, doors, lights, tires;
GetPlayerKeys(playerid, Keys, ud, lr);
GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
if(lr > 0)
{
switch(GetPVarInt(playerid, \"vMainOn\")){
case 0:{
switch(GetPVarInt(playerid, \"vBlinkOn\")){
case 0:{
lights = encode_lights(1, 1, 0, 0);
SetPVarInt(playerid, \"vBlinkOn\", 1);
}
case 1:{
lights = encode_lights(1, 1, 1, 1);
SetPVarInt(playerid, \"vBlinkOn\", 0);
}
}
}
case 1:{
switch(GetPVarInt(playerid, \"vBlinkOn\")){
case 0:{
lights = encode_lights(0, 0, 1, 1);
SetPVarInt(playerid, \"vBlinkOn\", 1);
}
case 1:{
lights = encode_lights(0, 0, 0, 0);
SetPVarInt(playerid, \"vBlinkOn\", 0);
}
}
}
}
}
else if(lr < 0)
{
switch(GetPVarInt(playerid, \"vMainOn\")){
case 0:{
switch(GetPVarInt(playerid, \"vBlinkOn\")){
case 0:{
lights = encode_lights(0, 0, 1, 1);
SetPVarInt(playerid, \"vBlinkOn\", 1);
}
case 1:{
lights = encode_lights(1, 1, 1, 1);
SetPVarInt(playerid, \"vBlinkOn\", 0);
}
}
}
case 1:{
switch(GetPVarInt(playerid, \"vBlinkOn\")){
case 0:{
lights = encode_lights(1, 1, 0, 0);
SetPVarInt(playerid, \"vBlinkOn\", 1);
}
case 1:{
lights = encode_lights(0, 0, 0, 0);
SetPVarInt(playerid, \"vBlinkOn\", 0);
}
}
}
}
}else if(lr == 0)
{
switch(GetPVarInt(playerid, \"vMainOn\")){
case 0:{
lights = encode_lights(1, 1, 1, 1);
}
case 1:{
lights = encode_lights(0, 0, 0, 0);
}
}
}
UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
}
return 1;
}
// Thanks to JernejL (RedShirt)
encode_lights(light1, light2, light3, light4) {
return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
}[/pawn]