Here is the define of pInfo
Код:
PlayerInfo[MAX_PLAYERS][pInfo];
Quote:
Could we see the lines above this?
|
Here are the lines above it :
Код:
// This callback gets called when a player connects to the server
public OnPlayerConnect(playerid)
{
// Always allow NPC's to login without password or account
if (IsPlayerNPC(playerid))
return 1;
// Setup local variables
new Name[MAX_PLAYER_NAME], NewPlayerMsg[128], HouseID;
// Setup a PVar to allow cross-script money-transfers (only from filterscript to this mainscript) and scorepoints
SetPVarInt(playerid, "PVarMoney", 0);
SetPVarInt(playerid, "PVarScore", 0);
// Reset the player's money and set it to the stored value in the player's account (do the same for scorepoints)
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, APlayerData[playerid][PlayerMoney]);
SetPlayerScore(playerid, APlayerData[playerid][PlayerScore]);
// Limit the cash that the player can have
if (APlayerData[playerid][PlayerMoney] > 999000000)
APlayerData[playerid][PlayerMoney] = 999000000;
// Limit the cash that the player can have below 0
if (APlayerData[playerid][PlayerMoney] < -1000000)
APlayerData[playerid][PlayerMoney] = -1000000;
// Get the playername
GetPlayerName(playerid, Name, sizeof(Name));
// Also store this name for the player
GetPlayerName(playerid, APlayerData[playerid][PlayerName], 24);
// Send a message to all players to let them know somebody else joined the server
format(NewPlayerMsg, 128, TXT_PlayerJoinedServer, Name, playerid);
SendClientMessageToAll(0xFFFFFFFF, NewPlayerMsg);
// Try to load the player's datafile ("PlayerFile_Load" returns "1" is the file has been read, "0" when the file cannot be read)
if (PlayerFile_Load(playerid) == 1)
{
// Check if the player is still banned
if (APlayerData[playerid][BanTime] < gettime()) // Player ban-time is passed
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, TXT_DialogLoginTitle, TXT_DialogLoginMsg, TXT_DialogLoginButton1, TXT_DialogButtonCancel);
else // Player is still banned
{
ShowRemainingBanTime(playerid); // Show the remaining ban-time to the player is days, hours, minutes, seconds
Kick(playerid); // Kick the player
}
}
else
ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_INPUT, TXT_DialogRegisterTitle, TXT_DialogRegisterMsg, TXT_DialogRegisterButton1, TXT_DialogButtonCancel);
// The houses have been loaded but not the cars, so load all vehicles assigned to the player's houses
for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
{
// Get the HouseID from this slot
HouseID = APlayerData[playerid][Houses][HouseSlot];
// Check if there is a house in this slot
if (HouseID != 0)
HouseFile_Load(HouseID, true); // Load the cars <a href="http://cityadspix.com/tsclick-BQBE4NPP-VRMIQUYF?url=http%3A%2F%2Fwww.enter.ru%2Fproduct%2Felectronics%2Figra-dlya-pc-mass-effect-2060401002513&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9<=2&tl=3&im=Mjc3NS0wLTE0MTgyOTQ1NzQtMTIyNDkyNzY%3D&fid=NDQ1NzU2Nzc1&prdct=08390a34013b0c3702&kw=of%20the" target="_blank" alt="Art of the Mass Effect Universe" title="Art of the Mass Effect Universe" style="">of the</a> house
}
// Speedometer setup
Speedometer_Setup(playerid);
// MissionText TextDraw setup
APlayerData[playerid][MissionText] = TextDrawCreate(320.0, 430.0, " "); // Setup the missiontext at the bottom of the screen
TextDrawAlignment(APlayerData[playerid][MissionText], 2); // Align the missiontext to the center
TextDrawUseBox(APlayerData[playerid][MissionText], <a href="http://cityadspix.com/tsclick-BQBE4NPP-VRMIQUYF?url=http%3A%2F%2Fwww.enter.ru%2Fproduct%2Fchildren%2Fkolyaska-concord-neo-travel-set-pepper-sleeper-air-2010206024876&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9<=2&tl=3&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&im=Mjc3NS0wLTE0MTgyOTQ1NzQtMTQ0NTM2MTg%3D&fid=NDQ1NzU2Nzc1&prdct=0e3a0e3c043e0f3603&kw=1)%3B%20%2F%2F%20Set" target="_blank" alt="Neo Travel Set (3 в 1), люлька Sleeper, автокресло Air" title="Neo Travel Set (3 в 1), люлька Sleeper, автокресло Air" style="">1); // Set</a> the missiontext to display inside a box
TextDrawBoxColor(APlayerData[playerid][MissionText], 0x00000066); // Set the box color of the missiontext
// Display a message if the player hasn't accepted the rules yet
if (APlayerData[playerid][RulesRead] == false)
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet");
// Setup local variables
new BusID;
// Update the AutoEvict-time for this player's houses and businesses
for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
{
// Get the HouseID from this slot
HouseID = APlayerData[playerid][Houses][HouseSlot];
// Check if there is a house in this slot
if (HouseID != 0)
AHouseData[HouseID][AutoEvictDays] = AutoEvict[AEDays];
}
for (new BusSlot; BusSlot < MAX_<a href="http://cityadspix.com/tsclick-BQCE4WRF-SLZKVXTQ?&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9<=2&tl=1&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&im=MTc1NS0wLTE0MTgyOTQ1NzQtMTY0MDYzNjU%3D&fid=NDQ1NzU2Nzc1&kw=BUSINESSPERPLAYER" target="_blank" alt="mba.ru" title="mba.ru" style="">BUSINESSPERPLAYER</a>; BusSlot++)
{
// Get the BusID from this slot
BusID = APlayerData[playerid][<a href="http://cityadspix.com/tsclick-BQCE4WRF-SLZKVXTQ?&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9<=2&tl=1&im=MTc1NS0wLTE0MTgyOTQ1NzQtMTE1NTgyNzQ%3D&fid=NDQ1NzU2Nzc1&kw=Business" target="_blank" alt="mba.ru" title="mba.ru" style="">Business</a>][BusSlot];
// Check if there is a business in this slot
if (BusID != 0)
ABusinessData[BusID][AutoEvictDays] = AutoEvict[AEDays];
}
PlayerInfo[playerid][pVIP] = 0; //Setting the VIP level 0 on player connect-
Enablevheal[playerid] = 1; //Enabling the /vheal command on player connect--
Enablevbonus[playerid] = 1; //Enabling the /vbonus command on player connect
HasSpawnedCar[playerid] = 0;//-Setting the value to 0
//-------------Checking and creating the player account in database---------
if(fexist(getACC(playerid)))
{
new string[256];
INI_Open(getACC(playerid));
PlayerInfo[playerid][pVIP] = INI_ReadInt("Level");
//Error is on this line///// format(string, sizeof(string),"Welcome %s Your VIP level has been successfully loaded [VIP Level: %d][VIP Rank: %s]",PlayerName(playerid),PlayerInfo[playerid][pVIP],Rank(playerid));
print("\n----------------------------------------------------------");
printf("_____[%s] Very Important Player Connected_____", PlayerName(playerid));
print("------------------------------------------------------------\n");
SendClientMessage(playerid, GREEN,string);
}
else
{
MakeACC(playerid); //Creating the account if the account doesn't exists
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}