Help, Vortex Server Question
#1

My gamemode that I upload to my host, Vortex Servers, should work and act exactly the same as it does when I run it on local host correct? It's not doing something right, on my local host when you register it gives you some dialogs and everything and determines where you'll spawn and such and sets your skin. When I'm running it on the Vortex Host when I click spawn instead it puts me in blueberry where everyone goes when something's screwed up.. Doesn't set my skin or anything. Player can have 3 skins which are saved in a dini and after I spawn out there I can /changeclothes and set the skin so it is loading the dini files I suppose.

I have never used a host or anything like this before, maybe I'm forgetting to upload some crucial files or something? Everything else on the server as far as I can tell seems to be working normally, including car spawns and all features and dialogs.

My server IP is: 96.8.115.229:7780

Thanks for any help, I'm puzzled as actually having a hosted server like this is new to me

pawn Код:
public OnPlayerConnect(playerid)
{
    gPlayerLogged[playerid] = 0; Mobile[playerid] = 255;
   
    check_timer[playerid] = SetTimerEx("MoneyCheck",CHECKING_INT,1,"i",playerid);
   
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if (!dini_Exists(file))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, input your new password below", "Register", "Leave");
        dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
        dini_IntSet(file, "LevelTime",PlayerInfo[playerid][pLevelTime] = 3600);
        dini_IntSet(file, "HungerTime",PlayerInfo[playerid][pHungerTime] = 900);
        dini_IntSet(file, "Hunger", PlayerInfo[playerid][pHunger] = 100);
        dini_FloatSet(file, "Health", PlayerInfo[playerid][pHealth] = 100);
        dini_IntSet(file, "Bank", PlayerInfo[playerid][pBank] = 1000);
    }
    if(fexist(file))
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Hi your registered","Welcome, Input your password below", "Login", "Leave");
        LoadInfo(playerid);
        RentingFaggio[playerid] = 0;
        PlayerInfo[playerid][pFaggioID] = 0;
        PlayerInfo[playerid][pFaggioRental] = 0;
    }
    return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    new INTERIOR = PlayerInfo[playerid][pInt];
    new WORLD = PlayerInfo[playerid][pVW];
    new SKIN = PlayerInfo[playerid][pPSkin];
    SetPlayerPos(playerid, dini_Float(file, "PositionX"), dini_Float(file, "PositionY"), dini_Float(file, "PositionZ"));
    SetPlayerFacingAngle(playerid, dini_Float(file, "PositionA"));
    SetPlayerInterior(playerid, INTERIOR);
    SetPlayerVirtualWorld(playerid, WORLD);
    SetPlayerSkin(playerid, SKIN);
    SetCameraBehindPlayer(playerid);
   
    OwnedCar0[playerid] = -100;

    TogglePlayerClock(playerid,0);

    if(PlayerInfo[playerid][pTutorial] == 1)
    {
    //  SetPlayerPos(playerid,positionx1,positiony1,positionz1);
    //  SetPlayerFacingAngle(playerid, PAngle);
     // SetPlayerInterior(playerid, PInterior);
      //    SetPlayerVirtualWorld(playerid, PVWorld);
      //    SetPlayerSkin(playerid, pSkin);
        return 1;
    }
    if(PlayerInfo[playerid][pTutorial] == 0)
    {
        SetPlayerPos(playerid, 1565.852905, -1750.514404, 4.612752);
        SetPlayerVirtualWorld(playerid, 99);
        SetPlayerCameraPos(playerid, 1544.773071, -1374.633544, 330.060302);
        SetPlayerCameraLookAt(playerid, 1483.913085, -1750.473999, 15.445312);
        ShowPlayerDialog(playerid, SEX, DIALOG_STYLE_LIST, "Are you Male or Female?", "Male\nFemale", "Select", "Cancel");
        SendClientMessage(playerid, COLOR_YELLOW, "Insert Tutorial Here!");
        return 1;
    }
    if(PlayerInfo[playerid][pFaggioID] > 0)
    {
        PlayerInfo[playerid][pFaggioID] = 0;
        return 1;
    }
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Server]: /spawnmycars if you own vehicles to spawn them!");
    LoadCarInfo(playerid);
    return 1;
}


Also after player is registered and leaves and after I restart the server and try to log in again it gives me this crap so I'm guessing this has something to do with the spawning :/ mmmh.
Reply
#2

Yes that last error is a spawn error or maybe if you use mods.
I think vortex host is linux not sure but i think if it is you must get plugins for it with .so
Also you need streamer.so plugin if you already don't have it
Reply
#3

Quote:
Originally Posted by 1FreeHost
Посмотреть сообщение
Yes that last error is a spawn error or maybe if you use mods.
I think vortex host is linux not sure but i think if it is you must get plugins for it with .so
Also you need streamer.so plugin if you already don't have it

Did you mean streamer.dll? That's my plugin folder on vortex.

And yes I am running my server on windows on my local host, and I thought that vortex was running on windows 2008 or something, I'm pretty sure it's running on windows anyway...


I believe since the console is set up like this that it is running off of windows, correct?

And streamer.so is for linux and streamer.dll is for windows I checked. But I don't even think I use it.

I also just created a new folder on my desktop and just put the files that I have uploaded to vortex in it and ran the script and it still worked perfectly..
Reply
#4

pawn Код:
AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Put that under OnGameModeInit AND create a user folder inside scriptfiles if you're not using MySQL
Reply
#5

Quote:
Originally Posted by Tingesport
Посмотреть сообщение
pawn Код:
AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Put that under OnGameModeInit AND create a user folder inside scriptfiles if you're not using MySQL
Well buddy, I'm gonna level with you, I don't know how that made a hell of a difference to the vortex host.. but it did. You saved my day!
Reply
#6

Haha, no problems! good luck
Reply
#7

I have run into yet another problem that occurs on the vortex host and not on my local host, with the user files... I thought it was because of the dini so I converted over to Y_INI and it does work better but it's still doing one annoying thing. It loading player positions and skins from from the last user file to log off.. For new users after the registration dialogs I have a set position for them to spawn and that works. And if I log back in with the same name it loads correctly. Then I go to a different user I already have it loads correctly. Then when I go back to the other name and log back in it spawns me at the last users location with their skin.

pawn Код:
#include <YSI\y_ini>
#define     SavePath        "RSRP/USERS/%s.ini"
pawn Код:
enum pInfo
{
    pPassword,
    pAdminLevel,
    Float:X,
    Float:Y,
    Float:Z,
    Float:A,
    pInt,
    pVW,
    pPSkin,
    pHasPhone,
    pPhoneNumber,
    pPhonebook,
    pID,
    pCash,
    pScore,
    pTutorial,
    pSex,
    pDOB,
    pMOB,
    pYOB,
    pOrigin,
    pHasMap,
    pClothes1,
    pClothes2,
    pClothes3,
    pFaggioRental,
    pFaggioID,
    pRentalRefund,
    pLegalJob,
    pJobTime,
    pFishingTime,
    pDLicense,
    pBLicense,
    pDeliveryScore,
    pSweepingScore,
    pCollectingScore,
    pFishingScore,
    pOwnsBizz,
    pLevelTime,
    pHungerTime,
    pHunger,
    Float:pHealth,
    pBank,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
public OnPlayerConnect(playerid)
{
    gPlayerLogged[playerid] = 0; Mobile[playerid] = 255;
   
    check_timer[playerid] = SetTimerEx("MoneyCheck",CHECKING_INT,1,"i",playerid);
    SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
    if(fexist(Path(playerid)))
    {
        INI_ParseFile(Path(playerid),"LoadUserData_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Hi your registered","Welcome, Input your password below", "Login", "Leave");
        RentingFaggio[playerid] = 0;
        PlayerInfo[playerid][pFaggioID] = 0;
        PlayerInfo[playerid][pFaggioRental] = 0;
    }
    else
    {
        new INI:file = INI_Open(Path(playerid));
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, input your new password below", "Register", "Leave");
        INI_SetTag(file,"QGRP");
        INI_WriteInt(file, "Score",PlayerInfo[playerid][pScore] = 0);
        INI_WriteInt(file, "LevelTime",PlayerInfo[playerid][pLevelTime] = 3600);
        INI_WriteInt(file, "HungerTime",PlayerInfo[playerid][pHungerTime] = 900);
        INI_WriteInt(file, "Hunger", PlayerInfo[playerid][pHunger] = 100);
        INI_WriteFloat(file, "Health", PlayerInfo[playerid][pHealth] = 100);
        INI_WriteFloat(file, "Bank", PlayerInfo[playerid][pBank] = 1000);
        INI_Close(file);
    }

    return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid)
{
    if(gPlayerLogged[playerid] == 1)
    {
        new INI:file = INI_Open(Path(playerid));
        INI_WriteInt(file, "Score", PlayerInfo[playerid][pScore]);
        INI_WriteInt(file, "Money", PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid));
        INI_WriteInt(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
        INI_WriteInt(file, "Int",PlayerInfo[playerid][pInt]);
        INI_WriteInt(file, "VW",PlayerInfo[playerid][pVW]);
        INI_WriteInt(file, "PSkin",PlayerInfo[playerid][pPSkin]);
        INI_WriteInt(file, "HasPhone", PlayerInfo[playerid][pHasPhone]);
        INI_WriteInt(file, "PhoneNumber", PlayerInfo[playerid][pPhoneNumber]);
        INI_WriteInt(file, "Phonebook", PlayerInfo[playerid][pPhonebook]);
        INI_WriteInt(file, "ID", PlayerInfo[playerid][pID]);
        INI_WriteInt(file, "Tutorial", PlayerInfo[playerid][pTutorial]);
        INI_WriteInt(file, "Sex", PlayerInfo[playerid][pSex]);
        INI_WriteInt(file, "DOB", PlayerInfo[playerid][pDOB]);
        INI_WriteInt(file, "MOB", PlayerInfo[playerid][pMOB]);
        INI_WriteInt(file, "YOB", PlayerInfo[playerid][pYOB]);
        INI_WriteInt(file, "Origin", PlayerInfo[playerid][pOrigin]);
        INI_WriteInt(file, "HasMap", PlayerInfo[playerid][pHasMap]);
        INI_WriteInt(file, "Clothes1", PlayerInfo[playerid][pClothes1]);
        INI_WriteInt(file, "Clothes2", PlayerInfo[playerid][pClothes2]);
        INI_WriteInt(file, "Clothes3", PlayerInfo[playerid][pClothes3]);
        INI_WriteInt(file, "FaggioRental", PlayerInfo[playerid][pFaggioRental]);
        INI_WriteInt(file, "FaggioID", PlayerInfo[playerid][pFaggioID]);
        INI_WriteInt(file, "RentalRefund", PlayerInfo[playerid][pRentalRefund]);
        INI_WriteInt(file, "LegalJob", PlayerInfo[playerid][pLegalJob]);
        INI_WriteInt(file, "JobTime", PlayerInfo[playerid][pJobTime]);
        INI_WriteInt(file, "FishingTime", PlayerInfo[playerid][pFishingTime]);
        INI_WriteInt(file, "DLicense", PlayerInfo[playerid][pDLicense]);
        INI_WriteInt(file, "BLicense", PlayerInfo[playerid][pBLicense]);
        INI_WriteInt(file, "DeliveryScore", PlayerInfo[playerid][pDeliveryScore]);
        INI_WriteInt(file, "SweepingScore", PlayerInfo[playerid][pSweepingScore]);
        INI_WriteInt(file, "CollectingScore", PlayerInfo[playerid][pCollectingScore]);
        INI_WriteInt(file, "FishingScore", PlayerInfo[playerid][pFishingScore]);
        INI_WriteInt(file, "OwnsBizz", PlayerInfo[playerid][pOwnsBizz]);
        INI_WriteInt(file, "LevelTime", PlayerInfo[playerid][pLevelTime]);
        INI_WriteInt(file, "HungerTime", PlayerInfo[playerid][pHungerTime]);
        INI_WriteInt(file, "Hunger", PlayerInfo[playerid][pHunger]);
        INI_WriteFloat(file, "Health", PlayerInfo[playerid][pHealth]);
        INI_WriteInt(file, "Bank", PlayerInfo[playerid][pBank]);
        INI_WriteFloat(file, "PositionX", x);
        INI_WriteFloat(file, "PositionY", y);
        INI_WriteFloat(file, "PositionZ", z);
        INI_WriteFloat(file, "PositionA", a);
        INI_WriteFloat(file, "Health", PlayerHealth);
        INI_Close(file);
    }
    return 1;
}
pawn Код:
if (dialogid == 2)//login dialog
    {
        new name[MAX_PLAYERS];
        GetPlayerName(playerid, name, sizeof(name));
        if(!response) return Kick(playerid);
        if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered :D. Inpute your pw below", "Login", "Leave");
        new tmp = PlayerInfo[playerid][pPassword];
        if(udb_hash(inputtext) != tmp)
        {
            SendClientMessage(playerid, COLOR_RED, "[QG'S RP]: Wrong Password");
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Hi your registered", "Welcome, input Your Password Below", "Login", "Leave");
        }
        else
        {
            gPlayerLogged[playerid] = 1;
            SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
            SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
            GivePlayerMoney2(playerid, PlayerInfo[playerid][pCash]-GetPlayerMoney(playerid));
            SendClientMessage(playerid,COLOR_RED, "[SYSTEM]: Successfully logged in!");
            ShowProgressBarForPlayer(playerid, plhunger[playerid]);
            TextDrawShowForPlayer(playerid, hungertext);
            if(PlayerInfo[playerid][pTutorial] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "Begin Tutorial");
                TutTime[playerid] = 1;
                return 1;
            }
        }
    }
pawn Код:
forward LoadUserData_user(playerid, name[], value[]);
public LoadUserData_user(playerid, name[], value[])
{
    INI_Int("Password", PlayerInfo[playerid][pPassword]);
    INI_Int("AdminLevel", PlayerInfo[playerid][pAdminLevel]);
    INI_Float("PositionX", PlayerInfo[playerid][X]);
    INI_Float("PositionY", PlayerInfo[playerid][Y]);
    INI_Float("PositionZ", PlayerInfo[playerid][Z]);
    INI_Float("PositionA", PlayerInfo[playerid][A]);
    INI_Int("Int", PlayerInfo[playerid][pInt]);
    INI_Int("VW", PlayerInfo[playerid][pVW]);
    INI_Int("PSkin", PlayerInfo[playerid][pPSkin]);
    INI_Int("HasPhone", PlayerInfo[playerid][pHasPhone]);
    INI_Int("PhoneNumber", PlayerInfo[playerid][pPhoneNumber]);
    INI_Int("Phonebook", PlayerInfo[playerid][pPhonebook]);
    INI_Int("ID", PlayerInfo[playerid][pID]);
    INI_Int("Money", PlayerInfo[playerid][pCash]);
    INI_Int("Score", PlayerInfo[playerid][pScore]);
    INI_Int("Tutorial", PlayerInfo[playerid][pTutorial]);
    INI_Int("Sex", PlayerInfo[playerid][pSex]);
    INI_Int("DOB", PlayerInfo[playerid][pDOB]);
    INI_Int("MOB", PlayerInfo[playerid][pMOB]);
    INI_Int("YOB", PlayerInfo[playerid][pYOB]);
    INI_Int("Origin", PlayerInfo[playerid][pOrigin]);
    INI_Int("HasMap", PlayerInfo[playerid][pHasMap]);
    INI_Int("Clothes1", PlayerInfo[playerid][pClothes1]);
    INI_Int("Clothes2", PlayerInfo[playerid][pClothes2]);
    INI_Int("Clothes3", PlayerInfo[playerid][pClothes3]);
    INI_Int("FaggioRental", PlayerInfo[playerid][pFaggioRental]);
    INI_Int("FaggioID", PlayerInfo[playerid][pFaggioID]);
    INI_Int("RentalRefund", PlayerInfo[playerid][pRentalRefund]);
    INI_Int("LegalJob", PlayerInfo[playerid][pLegalJob]);
    INI_Int("JobTime", PlayerInfo[playerid][pJobTime]);
    INI_Int("FishingTime", PlayerInfo[playerid][pFishingTime]);
    INI_Int("DLicense", PlayerInfo[playerid][pDLicense]);
    INI_Int("BLicense", PlayerInfo[playerid][pBLicense]);
    INI_Int("DeliveryScore", PlayerInfo[playerid][pDeliveryScore]);
    INI_Int("SweepingScore", PlayerInfo[playerid][pSweepingScore]);
    INI_Int("CollectingScore", PlayerInfo[playerid][pCollectingScore]);
    INI_Int("FishingScore", PlayerInfo[playerid][pFishingScore]);
    INI_Int("OwnsBizz", PlayerInfo[playerid][pOwnsBizz]);
    INI_Int("LevelTime", PlayerInfo[playerid][pLevelTime]);
    INI_Int("HungerTime", PlayerInfo[playerid][pHungerTime]);
    INI_Int("Hunger", PlayerInfo[playerid][pHunger]);
    INI_Float("Health", PlayerInfo[playerid][pHealth]);
    INI_Int("Bank", PlayerInfo[playerid][pBank]);
    return 1;
}
And another thing, the ini files created by the server are empty but the info is still saved somehow!


This is a user file that I uploaded, that was created by my local host server.


This is a user file created by the server on vortex! It's blank :O

And obviously now when a player tries to log back in it tells them that the password is incorrect everytime even if it is correct, which doesn't happen on my local host
Reply
#8

Anyone? Or should I switch hosts, or go to a VPS, I don't know how to use one of those yet and most of them run on linux which I've never used. Ideas?
Reply
#9

I would say contact Vortex Host or update everything once more.

Linux servers are almost the same to Windows as it comes to running SA-MP, you will need .so plugins instead of .dll that's it.
Reply
#10

Alright, thanks for your opinion, I'll do this and then if I can't figure anything out I'll switch to a linux host. I wish vortex would work though, I like their interface

Well, I went ahead and bought a vps from gforce and loaded all my stuff up in it and ran it, and guess what.. same results mmmh. Should I get rid of dini and Y_INI all together and try SQLite or MySQL? D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)