Neon system not working
#1

If i type /neon it opens the menu, but if i choose anything nothing happens...

Код:
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~ Blaues ~w~Neonlicht wurde auf deinem Fahrzeug erstellt!",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~Gruenes ~w~wurde auf deinem Fahrzeug erstellt!",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~Gelbes ~w~Neonlicht wurde auf deinem Fahrzeug erstellt!",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~Weisses ~w~Neonlicht wurde auf deinem Fahrzeug erstellt!",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~Pinkes ~w~Neonlicht wurde auf deinem Fahrzeug erstellt!",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~Neonlicht wurde entfernt",3500,5);
            	}
			}
        }
	return 0;
Код:
COMMAND:neon(playerid, params[])
	{
	    if(GetPVarInt(playerid, "DonatorRank")  > 0 || PlayerInfo[playerid][pAdmin] > 1337)
        {
                if(IsPlayerInAnyVehicle(playerid))
                {
                        if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
                        {
                        	SendClientMessage(playerid, COLOR_WHITE, "Du bist nicht der Fahrer!");
                         	return 1;
                        }
                        ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Wдhle eine Farbe aus","Blau\nGrьn\nGelb\nWeiЯ\nPink\nNeon ausschalten","Auswдhlen","Abbrechen");
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, " Du bist nicht in einem Fahrzeug !");
                }
                return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, " Du bist kein Donator/Admin !");
		}
		return 1;
	}
Reply
#2

Anyone know why?
Reply
#3

Anyone?? I will give +rep if anyone helps me, and note if i give you it automaticly gives you 3
Reply
#4

If youre using this as an FS, make sure OnDialogResponse returns 0;.
Reply
#5

maybe if you spawn a new car to the ground (by using for example: /sultan)
it won't work perfect

you can try with for example:
new Neon10[MX_VEHICLES+200];
Reply
#6

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
If youre using this as an FS, make sure OnDialogResponse returns 0;.
hmm tried that but some are still not working, do i have to put everywhere return 0; in filterscripts?
Reply
#7

err this may/maynot work but....


GEtVehiclePos and CreateObject in that pos then attach

as i said may not work :P
Reply
#8

pawn Код:
public OnDialogResponse(....)
{
    return 0; // <-- this should be 0
}
You had that?
Reply
#9

Yes, i 4 custom filterscripts which use dialogs

Neon, Woofer in cars, Listen mp3 songs and custom car horns

Woofer in cars and Listen mp3 songs are working

Car horns => I type /horn, then there are 2 buttons - "Choose" "Listen" but only listen is working, if i use "Choose" nothing happens

And the Neon FS, i built it in the gamemode but for some reason it doesn't respond
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)