Flashing Neon
#1

Hello everyone. This is my first post on here, so I hope it's in the correct section.

I just wanted to know if it is possible to create flashing neon lights on vehicles. I wanted to make flashing neon lights on fire trucks as sort of a "built in" ELM. A player could turn these lights on using a command such as /elm or /elights.

Thank you in advance for the help. Will add to your rep if your reply helped me.
Reply
#2

Bump^^
Reply
#3

You can try to attach/detach neon objects, I don't see any other way to do it.
Reply
#4

Quote:
Originally Posted by Norck
Посмотреть сообщение
You can try to attach/detach neon objects, I don't see any other way to do it.
But is there anyway to make those neon objects flash?
Reply
#5

Yeah, like Norck says, just be removing the light objects and then reattach them a second later.
Reply
#6

Thank you both! I will figure a way to script it myself. +rep for both!
Reply
#7

You could try creating 2 timers, top
pawn Код:
new togneon[MAX_PLAYERS];
forward togneonoff(playerid);
forward togneonon(playerid);
onplayerconnect
pawn Код:
SetTimerEx("togneonon",1000,0,"i",playerid);
command
pawn Код:
CMD:neon(playerid,params[])
{
     if(togneon[playerid] == 0)
     {
           togneon[playerid] = 1;
           SendClientMessage(playerid,-1,"You enabled flashing neon.");
     }
     else if(togneon[playerid] == 1)
     {
           togneon[playerid] = 0;
           SendClientMessage(playerid,-1,"You disabled flashing neon.");
     }
     return 1;
}
bottom
pawn Код:
public togneonon(playerid)
{
    if(togneon[playerid] == 1)
    {
    KillTimerEx("togneonon");
    SetTimerEx("togneonoff",1000,0,"i",playerid);
    //code for removing neon
    }
    return 1;
}
public togneonoff(playerid)
{
    if(togneon[playerid] == 1)
    {
    KillTimerEx("togneonoff");
    SetTimerEx("togneonon",1000,0,"i",playerid);
    //code for adding neon
    }
    return 1;
}
didnt tested but try
Reply
#8

lol..u must have a rep to give an Rep but yea what Norck say it correct attach it
Reply
#9

Quote:
Originally Posted by Tamao_Serizawa
Посмотреть сообщение
lol..u must have a rep to give an Rep but yea what Norck say it correct attach it
Lol. News to me. Anyway, thanks for your time!
Quote:
Originally Posted by Tanush123
Посмотреть сообщение
You could try creating 2 timers, top
pawn Код:
new togneon[MAX_PLAYERS];
forward togneonoff(playerid);
forward togneonon(playerid);
onplayerconnect
pawn Код:
SetTimerEx("togneonon",1000,0,"i",playerid);
command
pawn Код:
CMD:neon(playerid,params[])
{
     if(togneon[playerid] == 0)
     {
           togneon[playerid] = 1;
           SendClientMessage(playerid,-1,"You enabled flashing neon.");
     }
     else if(togneon[playerid] == 1)
     {
           togneon[playerid] = 0;
           SendClientMessage(playerid,-1,"You disabled flashing neon.");
     }
     return 1;
}
bottom
pawn Код:
public togneonon(playerid)
{
    if(togneon[playerid] == 1)
    {
    KillTimerEx("togneonon");
    SetTimerEx("togneonoff",1000,0,"i",playerid);
    //code for removing neon
    }
    return 1;
}
public togneonoff(playerid)
{
    if(togneon[playerid] == 1)
    {
    KillTimerEx("togneonoff");
    SetTimerEx("togneonon",1000,0,"i",playerid);
    //code for adding neon
    }
    return 1;
}
didnt tested but try
Wow! Thank you so much! I will test it! If I could +rep I would give u some!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)