SA-MP Forums Archive
Neon doesnt work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Neon doesnt work (/showthread.php?tid=271121)



Neon doesnt work - Horrible - 23.07.2011

pawn Код:
/*
||||||||||||||||||||||||||||||||||||||||
||Neon System By AlexzzPro            ||
||Please keep the credits to me       ||
||Do not re-relase without permisssion||
||Enjoy!                              ||
||||||||||||||||||||||||||||||||||||||||
*/

#define FILTERSCRIPT
#define COLOR_WHITE 0xFFFFFFAA
#include <a_samp>
#define NEON 1337 // Dialogid
#if defined FILTERSCRIPT
 
public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print(" Neon System By AlexzzPro");
        print("--------------------------------------\n");
        return 1;
}
 
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
        if (strcmp("/neon", cmdtext, true, 10) == 0)
        {
                if(IsPlayerInAnyVehicle(playerid))
                {
                        if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
                        {
                                SendClientMessage(playerid, COLOR_WHITE, "      You are not the driver");
                                return 1;
                        }
                        ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Choose your neon colour","Blue\nGreen\nYellow\nWhite\nPink\nTurn off Neon","Add","Close");
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, " You are not in a vehicle");
                }
                return 1;
        }
        return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == NEON)
        {
                if(response)
                {
                    if(listitem == 0)
                    {
                        SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
                SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~b~ Blue ~w~Neon has been added to your vehicle",3500,5);
                        }
                        if(listitem == 1)
                        {
                                SetPVarInt(playerid, "neon", 1);
                        SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
                        SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        GameTextForPlayer(playerid, "~g~Green ~w~Neon has been added to your vehicle",3500,5);
                        }
                        if(listitem == 2)
                        {
                            SetPVarInt(playerid, "neon", 1);
                        SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
                        SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                                GameTextForPlayer(playerid, "~y~Yellow~w~ Neon has been added to your vehicle",3500,5);
                        }
                        if(listitem == 3)
                        {
                                SetPVarInt(playerid, "neon", 1);
                                SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
                                SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~w~White~w~ Neon has been added to your vehicle",3500,5);
                        }
                        if(listitem == 4)
                        {
                                SetPVarInt(playerid, "neon", 1);
                        SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
                        SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                                GameTextForPlayer(playerid, "~p~Pink~w~ Neon has been added to your vehicle",3500,5);
                        }
                        if(listitem == 5)
                        {
                                DestroyObject(GetPVarInt(playerid, "blue"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "blue1"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "green"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "green1"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "yellow"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "yellow1"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "white"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "white1"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "pink"));
                    DeletePVar(playerid, "neon");
                    DestroyObject(GetPVarInt(playerid, "pink1"));
                    DeletePVar(playerid, "neon");
                    GameTextForPlayer(playerid, "~g~Neon was deleted from your vehicle",3500,5);
            }
                }
        }
        return 1;
}
please help...


Re: Neon doesnt work - Steven82 - 23.07.2011

Quote:
Originally Posted by Horrible
Посмотреть сообщение
[pawn]
please help...
Your problem is, your missing
pawn Код:
IdiotCredit[you] ++;



Re: Neon doesnt work - Horrible - 23.07.2011

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Your problem is, your missing
pawn Код:
IdiotCredit[you] ++;
what does meaning?
can someone help me?


Re: Neon doesnt work - Horrible - 26.07.2011

HELP......


Re: Neon doesnt work - Horrible - 27.07.2011

no one can help?


Re: Neon doesnt work - shaikh007 - 27.07.2011

are you using this in as filterscript


Re: Neon doesnt work - Horrible - 27.07.2011

Quote:
Originally Posted by shaikh007
Посмотреть сообщение
are you using this in as filterscript
yes,and why u asking it?


Re: Neon doesnt work - Lorenc_ - 27.07.2011

Quote:
Originally Posted by Horrible
Посмотреть сообщение
yes,and why u asking it?
Because you didn't identify the problem!


Re: Neon doesnt work - Snipa - 27.07.2011

If the object shows up, but it's not lighted, it needs to be darkish and the car has to be on the ground.

If it's not there, are you using a streamer? If so, convert the objects into your streamer type.


Re: Neon doesnt work - shaikh007 - 27.07.2011

Quote:
Originally Posted by Horrible
Посмотреть сообщение
yes,and why u asking it?
I was aksing that because i think you might have another filterscript with dialog box so if you have another filterscript with dialog then only one dialogbox can work others wont work or you should put neon filterscript at the first when you are defining filterscripts on server.cfg
Dialogs work only for the first filterscript that is loaded from server.cfg so try to put that neon filterscript at first then try again.


Re: Neon doesnt work - Horrible - 28.07.2011

Quote:
Originally Posted by shaikh007
Посмотреть сообщение
I was aksing that because i think you might have another filterscript with dialog box so if you have another filterscript with dialog then only one dialogbox can work others wont work or you should put neon filterscript at the first when you are defining filterscripts on server.cfg
Dialogs work only for the first filterscript that is loaded from server.cfg so try to put that neon filterscript at first then try again.
ok i'll try it.....
but not now because tomorrow i have a homework