PDA

View Full Version : Only works on Local Host not on 24/7 Host?


JaKe Elite
14/07/2012, 09:27 AM
Hello,
its pretty werid.
I have problem, neon only works in Local Host not in 24/7 host.
I try /neon in night time. but when i /neon theres nothing.

code


CMD:neon(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
ShowPlayerDialog(playerid, DIALOG_TYPE_NEONS, DIALOG_STYLE_LIST, "Choose your Neons:", "Blue\nGreen\nPink\nRed\nWhite\nYellow\nRemove Neons", "Select", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_RED, "*** You must be in a vehicle to use this command! ***");
}
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_TYPE_NEONS)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
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:
{
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);
}
case 2:
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon20", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon21", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon22", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "neon23", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon20"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon21"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon22"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon23"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 3:
{
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);
}
case 4:
{
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);
}
case 5:
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon32", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "neon33", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "neon34", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "neon35", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon32"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon33"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon34"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon35"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 6:
{
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, "neon20"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon21"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon22"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon23"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon32"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon33"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon34"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon35"));
}
}
}
}
return 1;
}

clarencecuzz
14/07/2012, 09:48 AM
Try not to reply on PVar too much.
Example:
SetPVarInt(playerid, "neon", CreateObject...)
can be replaced with:
neon = CreateObject(...

And
DestroyObject(GetPVarInt(playerid, "neon"...
can be replaced with:
DestroyObject(neon

However if you decide to use this, you must put new neon, neon1, neon2, neon3 etc. UNDER switch(listitem)

JaKe Elite
14/07/2012, 10:07 AM
I will try.
But is the PVarInt causing this problem?
it would be non-sense if i will follow your tip without reason.

clarencecuzz
14/07/2012, 10:12 AM
I can't say for sure if PVar is stopping it, but it's definitely not SendClientMessage... I have no other reason but to believe it is responsible.
Using my method would be a lot less buggier than using PVar if it were ever to bug.

JaKe Elite
14/07/2012, 10:26 AM
It don't work either.
Still the same....

JaKe Elite
14/07/2012, 10:59 AM
I need this thats why i'm bumping this.

BUMP