SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/07/2012, 09:27 AM   #1
_Jake_
High-roller
 
_Jake_'s Avatar
 
Join Date: Apr 2012
Location: Land of Ooo
Posts: 2,796
Reputation: 294
Default Only works on Local Host not on 24/7 Host?

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

pawn 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;
}
__________________
I stopped playing stunt servers long time ago and decided to enter the RolePlay servers and roleplay with it, You would find me playing in P:LA or in any popular servers, edit or not, My roleplay name would be always Ronald_Lacson.


When on UN-RP servers, My username would be always Jake_Hero, If you want to add me on Skype, the ID would be, spencer_

I need a user who can let me use JakAdmin 3.2.2 on their servers, I am glad if someone will let me, It's not that i will steal anything - You're the one who'll upload the Beta Script.
_Jake_ is offline   Reply With Quote
Old 14/07/2012, 09:48 AM   #2
clarencecuzz
Gangsta
 
Join Date: Jul 2010
Location: Australia
Posts: 940
Reputation: 89
Default Re: Only works on Local Host not on 24/7 Host?

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)
clarencecuzz is offline   Reply With Quote
Old 14/07/2012, 10:07 AM   #3
_Jake_
High-roller
 
_Jake_'s Avatar
 
Join Date: Apr 2012
Location: Land of Ooo
Posts: 2,796
Reputation: 294
Default Re: Only works on Local Host not on 24/7 Host?

I will try.
But is the PVarInt causing this problem?
it would be non-sense if i will follow your tip without reason.
__________________
I stopped playing stunt servers long time ago and decided to enter the RolePlay servers and roleplay with it, You would find me playing in P:LA or in any popular servers, edit or not, My roleplay name would be always Ronald_Lacson.


When on UN-RP servers, My username would be always Jake_Hero, If you want to add me on Skype, the ID would be, spencer_

I need a user who can let me use JakAdmin 3.2.2 on their servers, I am glad if someone will let me, It's not that i will steal anything - You're the one who'll upload the Beta Script.
_Jake_ is offline   Reply With Quote
Old 14/07/2012, 10:12 AM   #4
clarencecuzz
Gangsta
 
Join Date: Jul 2010
Location: Australia
Posts: 940
Reputation: 89
Default Re: Only works on Local Host not on 24/7 Host?

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.
clarencecuzz is offline   Reply With Quote
Old 14/07/2012, 10:26 AM   #5
_Jake_
High-roller
 
_Jake_'s Avatar
 
Join Date: Apr 2012
Location: Land of Ooo
Posts: 2,796
Reputation: 294
Default Re: Only works on Local Host not on 24/7 Host?

It don't work either.
Still the same....
__________________
I stopped playing stunt servers long time ago and decided to enter the RolePlay servers and roleplay with it, You would find me playing in P:LA or in any popular servers, edit or not, My roleplay name would be always Ronald_Lacson.


When on UN-RP servers, My username would be always Jake_Hero, If you want to add me on Skype, the ID would be, spencer_

I need a user who can let me use JakAdmin 3.2.2 on their servers, I am glad if someone will let me, It's not that i will steal anything - You're the one who'll upload the Beta Script.
_Jake_ is offline   Reply With Quote
Old 14/07/2012, 10:59 AM   #6
_Jake_
High-roller
 
_Jake_'s Avatar
 
Join Date: Apr 2012
Location: Land of Ooo
Posts: 2,796
Reputation: 294
Default Re: Only works on Local Host not on 24/7 Host?

I need this thats why i'm bumping this.

BUMP
__________________
I stopped playing stunt servers long time ago and decided to enter the RolePlay servers and roleplay with it, You would find me playing in P:LA or in any popular servers, edit or not, My roleplay name would be always Ronald_Lacson.


When on UN-RP servers, My username would be always Jake_Hero, If you want to add me on Skype, the ID would be, spencer_

I need a user who can let me use JakAdmin 3.2.2 on their servers, I am glad if someone will let me, It's not that i will steal anything - You're the one who'll upload the Beta Script.
_Jake_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
local host cruising Server Support 4 05/06/2011 07:52 PM
Existe manera de subir ping en host local? GROVE4L Espa˝ol/Spanish 32 15/02/2011 07:30 PM
Local Host - Not working. DaAce Client Support 2 18/10/2010 12:16 AM
Connecting to local host... chriswilson Server Support 0 14/03/2010 05:14 PM
The game disconnect...in local host??? Angelo94 Client Support 2 05/11/2009 12:49 PM


All times are GMT. The time now is 12:07 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.