22.03.2011, 12:13
Dialog Are Open But Im select that can't work why ?? in all Dialog script
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Login", "Please login", "Login", "Logout"); // 1 = the dialog ID
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1) // check if the dialog was ID 1
{
SendClientMessage(playerid, COLOR_WHITE, "Test succeed.");
return 1;
}
return 1;
}
//-_-_-_-_-_-_-_-_-_-_-_-_Neon System By [EDT]Quattro-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
//-_-_-_-_-_-_-_-_-_-_-_-_-_-Do Not Remove Credits_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
//-_-_-_-_-_-_-_-_-_-_-_-_-Commands: /neonshop /neon-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
//-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_Enjoy Using It!-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
//-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Neon System By [EDT]Quattro Loaded!");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Neon System By [EDT]Quattro Loaded!");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
#pragma tabsize 0
#define COLOR_YELLOW 0xFFFF00AA
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cartype = GetPlayerVehicleID(playerid);
new State=GetPlayerState(playerid);
if (strcmp(cmdtext, "/neon", true)==0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1017.62,-917.66,42.18))
{
ShowPlayerDialog(playerid, 8899, DIALOG_STYLE_LIST, "Pick Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nPolice Strobe\nInterior Lights\nBack Neon\nFront neon\nUndercover Roof Light\nRemove All Neon", "Select", "Cancel");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
}
return 1;}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 8899)
{
if(response)
{
if(listitem == 0)
{
//blue
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
if(listitem == 1)
{
//red
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
if(listitem == 2)
{
//green
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
if(listitem == 3)
{
//white
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
if(listitem == 4)
{
//pink
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
if(listitem == 5)
{
//yellow
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
if(listitem == 6)
{
//police
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon12", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "neon13", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon12"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon13"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
if(listitem == 7)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "interior", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "interior1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "interior"), GetPlayerVehicleID(playerid), 0, -0.0, 0, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "interior1"), GetPlayerVehicleID(playerid), 0, -0.0, 0, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Interior lights installed");
}
if(listitem == 8)
{
//back
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "back", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "back1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "back"), GetPlayerVehicleID(playerid), -0.0, -1.5, -1, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "back1"), GetPlayerVehicleID(playerid), -0.0, -1.5, -1, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Back neon installed");
}
if(listitem == 9)
{
//front
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "front", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "front1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "front"), GetPlayerVehicleID(playerid), -0.0, 1.5, -0.6, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "front1"), GetPlayerVehicleID(playerid), -0.0, 1.5, -0.6, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Front neon installed");
}
if(listitem == 10)
{
//undercover
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "undercover", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "undercover1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "undercover"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "undercover1"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Undercover lights installed");
}
if(listitem == 11)
{
//remove neon
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon2"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon3"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon4"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon5"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon6"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon7"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon8"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon9"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon10"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon11"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon12"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon13"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "interior"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "interior1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "back"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "back1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "front"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "front1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "undercover"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "undercover1"));
DeletePVar(playerid, "Status");
}
}
}
return 0;}
public OnPlayerConnect()
{
new playerid;
SendClientMessage(playerid, COLOR_YELLOW,"This server is using neon system by [EDT]Quattro. Use /neonshop!");
return 1;
}
//do not remove credits please...
The problem is, you didn't use /t for a listitem.
Try this: pawn Код:
|
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 8899)
{
if(response)
{
switch(listitem)
{
case 0:
{
//blue
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 1:
{
//red
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
case 2:
{
//green
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
case 3:
{
//white
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
case 4:
{
//pink
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
case 5:
{
//yellow
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
case 6:
{
//police
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon12", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "neon13", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon12"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon13"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
}
case 7:
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "interior", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "interior1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "interior"), GetPlayerVehicleID(playerid), 0, -0.0, 0, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "interior1"), GetPlayerVehicleID(playerid), 0, -0.0, 0, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Interior lights installed");
}
case 8:
{
//back
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "back", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "back1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "back"), GetPlayerVehicleID(playerid), -0.0, -1.5, -1, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "back1"), GetPlayerVehicleID(playerid), -0.0, -1.5, -1, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Back neon installed");
}
case 9:
{
//front
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "front", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "front1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "front"), GetPlayerVehicleID(playerid), -0.0, 1.5, -0.6, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "front1"), GetPlayerVehicleID(playerid), -0.0, 1.5, -0.6, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Front neon installed");
}
case 10:
{
//undercover
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "undercover", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "undercover1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "undercover"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "undercover1"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Undercover lights installed");
}
case 11:
{
//remove neon
//I personally would remove those vars on an other way.
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon2"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon3"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon4"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon5"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon6"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon7"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon8"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon9"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon10"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon11"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon12"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon13"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "interior"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "interior1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "back"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "back1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "front"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "front1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "undercover"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "undercover1"));
DeletePVar(playerid, "Status");
}
}
}
return 1;
}
return 0;
}