
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;
}
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;
}

|
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 |


AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
pawn Код:
|
#include <YSI\y_ini>
#define SavePath "RSRP/USERS/%s.ini"
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];
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;
}
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;
}
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;
}
}
}
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;
}



mmmh. Should I get rid of dini and Y_INI all together and try SQLite or MySQL? D: