Account save problem
#1

Hello when i login on my server i get this in the server_log plus the accounts aren't saving



Код:
[13:31:01] Incoming connection: ****.***.***.***:*****
[13:31:02] [join] Dennis has joined the server (**:***.***.***.***)
[13:31:03] [debug] Run time error 4: "Array index out of bounds"
[13:31:03] [debug]  Accessing element at index 12 past array upper bound 11
[13:31:03] [debug] AMX backtrace:
[13:31:03] [debug] #0 005e34a4 in ?? () from cgrp.amx
[13:31:03] [debug] #1 005e3304 in public ServerHeartbeatTwo@_yT () from cgrp.amx
[13:31:04] [debug] Run time error 4: "Array index out of bounds"
[13:31:04] [debug]  Accessing element at index 12 past array upper bound 11
[13:31:04] [debug] AMX backtrace:
[13:31:04] [debug] #0 005e34a4 in ?? () from cgrp.amx
[13:31:04] [debug] #1 005e3304 in public ServerHeartbeatTwo@_yT () from cgrp.amx
[13:31:05] [debug] Run time error 4: "Array index out of bounds"
[13:31:05] [debug]  Accessing element at index 12 past array upper bound 11
[13:31:05] [debug] AMX backtrace:
[13:31:05] [debug] #0 005e34a4 in ?? () from cgrp.amx
[13:31:05] [debug] #1 005e3304 in public ServerHeartbeatTwo@_yT () from cgrp.amx
[13:31:06] [debug] Run time error 4: "Array index out of bounds"
[13:31:06] [debug]  Accessing element at index 12 past array upper bound 11
[13:31:06] [debug] AMX backtrace:
[13:31:06] [debug] #0 005e34a4 in ?? () from cgrp.amx
[13:31:06] [debug] #1 005e3304 in public ServerHeartbeatTwo@_yT () from cgrp.amx
[13:31:07] [debug] Run time error 4: "Array index out of bounds"
[13:31:07] [debug]  Accessing element at index 12 past array upper bound 11
[13:31:07] [debug] AMX backtrace:
[13:31:07] [debug] #0 005e34a4 in ?? () from cgrp.amx
[13:31:07] [debug] #1 005e3304 in public ServerHeartbeatTwo@_yT () from cgrp.amx
[13:31:08] [debug] Run time error 4: "Array index out of bounds"
[13:31:08] [debug]  Accessing element at index 12 past array upper bound 11
[13:31:08] [debug] AMX backtrace:
[13:31:08] [debug] #0 005e34a4 in ?? () from cgrp.amx
[13:31:08] [debug] #1 005e3304 in public ServerHeartbeatTwo@_yT () from cgrp.amx
[13:31:10] [debug] Run time error 4: "Array index out of bounds"
[13:31:10] [debug]  Accessing element at index 12 past array upper bound 11
[13:31:10] [debug] AMX backtrace:
[13:31:10] [debug] #0 005e34a4 in ?? () from cgrp.amx
[13:31:10] [debug] #1 005e3304 in public ServerHeartbeatTwo@_yT () from cgrp.amx
Please someone now how to fix this?? Also here is the Server Heart

1#
Код:
// Timer Name: ServerHeartbeat()
// TickRate: 1 secs.
ptask ServerHeartbeat[1000](playerid)
{
    new string[128];
	new level = PlayerInfo[playerid][pLevel];
	
	/////////////////////////// Toll Booth Check ///////////////////////////////
	if(PlayerInfo[playerid][pAtTollBooth] == 0 && IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0)
	{
	    for(new i = 0; i < MAX_TOLL_BOOTHS; i++)
	    {
	        if(PlayerInfo[playerid][pAtTollBooth] == 0)
			{
		        new Float:TBX, Float:TBY, Float:TBZ, hasezpass;
		        GetDynamicObjectPos(TollBooths[i], TBX, TBY, TBZ);
		        if(IsPlayerInRangeOfPoint(playerid, 10.0, TBX, TBY, TBZ))
		        {
		            if(TollShutdown == 0)
		    		{
			            new carid = GetPlayerVehicleID(playerid);
						for(new v=0; v<MAX_PLAYERVEHICLES; v++)
						{
							if(PlayerVehicleInfo[playerid][v][pvId] == carid && PlayerVehicleInfo[playerid][v][pvEZPass] == 1)
					 		{
					 		    hasezpass = 1;
							}
						}
		    			if(hasezpass == 1)
			 	    	{
         					new ClosestTollObject = GetClosestTollObject(playerid);
					        new Float:X, Float:Y, Float:Z, Float:RX, Float:RY, Float:RZ;
	            			GetDynamicObjectPos(ClosestTollObject, X, Y, Z);
			            	GetDynamicObjectRot(ClosestTollObject, RX, RY, RZ);
					        new str[64];
				            MoveDynamicObject(ClosestTollObject, X, Y, Z, 1, RX, 0.0, RZ);
							SendClientMessageEx(playerid, COLOR_YELLOW, "Your EZPass Transponder has automatically let you through the toll booth.");
                            if(IsABike(carid) && !IsACopCar(carid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // Is it a Bike and not a cop bike
						    {
						        // Charge Calculations
						        new taxcharge = floatround(((5 * TaxValue)/100), floatround_ceil);
						        new totalcharge = taxcharge + 5;
						        PlayerInfo[playerid][pAccount] -= totalcharge;
						        format(str, sizeof(str), "Your account has been automatically deducted $%d", totalcharge);
						        SendClientMessageEx(playerid, COLOR_YELLOW, str);
							}
                            else if(IsAHeavyVehicle(carid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // Is it a Truck or Van
						    {
					        	if(IsTrailerAttachedToVehicle(carid))
						        {
							 	  // Charge Calculations
							        new taxcharge = floatround(((25 * TaxValue)/100), floatround_ceil);
							        new totalcharge = taxcharge + 25;
							        PlayerInfo[playerid][pAccount] -= totalcharge;
							        format(str, sizeof(str), "Your account has been automatically deducted $%d", totalcharge);
						        	SendClientMessageEx(playerid, COLOR_YELLOW, str);
								}
								else
								{
							 	// Charge Calculations
						        new taxcharge = floatround(((15 * TaxValue)/100), floatround_ceil);
						        new totalcharge = taxcharge + 15;
						        PlayerInfo[playerid][pAccount] -= totalcharge;
						        format(str, sizeof(str), "Your account has been automatically deducted $%d", totalcharge);
					        	SendClientMessageEx(playerid, COLOR_YELLOW, str);
								}
							}
							else // It's something else (Normal Car)
						    {
						        if(IsTrailerAttachedToVehicle(carid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
						        {
					                // Charge Calculations
							        new taxcharge = floatround(((15 * TaxValue)/100), floatround_ceil);
							        new totalcharge = taxcharge + 15;
							        PlayerInfo[playerid][pAccount] -= totalcharge;
							        format(str, sizeof(str), "Your account has been automatically deducted $%d", totalcharge);
						        	SendClientMessageEx(playerid, COLOR_YELLOW, str);
								}
								else
								{
					                // Charge Calculations
							        new taxcharge = floatround(((10 * TaxValue)/100), floatround_ceil);
							        new totalcharge = taxcharge + 10;
							        PlayerInfo[playerid][pAccount] -= totalcharge;
							        format(str, sizeof(str), "Your account has been automatically deducted $%d", totalcharge);
						        	SendClientMessageEx(playerid, COLOR_YELLOW, str);
								}
							}

				            SetTimerEx("ResetTollBoothObject", 5000, 0, "ii", playerid, ClosestTollObject);

							PlayerInfo[playerid][pAtTollBooth] = 1;
       						SetTimerEx("ResetTollBoothMenu", 5000, 0, "i", playerid);
						}
						if(hasezpass != 1)
	     				{
						    new str[1024];
						    PlayerInfo[playerid][pAtTollBooth] = 1;

						    if(IsABike(carid) && !IsACopCar(carid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // Is it a Regular Bike and not a COP Bike
						    {
						        // Charge Calculations
						        new taxcharge = floatround(((5 * TaxValue)/100), floatround_ceil);
						        new totalcharge = taxcharge + 5;

						        format(string, sizeof(string), "{00FF00}Los Angeles - Las Vegas Toll Booth Charge\n\n");
						        strcat(str, string);
						        format(string, sizeof(string), "{FFFFFF}Vehicle Type: Motorbike / Off-Road Bike\n");
						        strcat(str, string);
						        format(string, sizeof(string), "{FFFFFF}Tax Charge: $%d\n", taxcharge);
						        strcat(str, string);
						        format(string, sizeof(string), "{FFFFFF}Vehicle Charge: $5\n");
						        strcat(str, string);
						        format(string, sizeof(string), "{FFFFFF}Total Charge: $%d\n", totalcharge);
						        strcat(str, string);
								ShowPlayerDialog(playerid, DIALOG_TOLLBOOTH, DIALOG_STYLE_MSGBOX, "{FFFFFF}LA-LV Tollbooth", str, "Accept", "Reject");
								PlayerInfo[playerid][pTollBoothCharge] = totalcharge;
						    }
						    else if(IsAHeavyVehicle(carid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // Is it a Truck or Van
						    {
					            if(IsTrailerAttachedToVehicle(carid))
						        {
					                // Charge Calculations
							        new taxcharge = floatround(((25 * TaxValue)/100), floatround_ceil);
							        new totalcharge = taxcharge + 25;

							        format(string, sizeof(string), "{00FF00}Los Angeles - Las Vegas Toll Booth Charge\n\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Vehicle Type: Heavy Vehicle and Trailer\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Tax Charge: $%d\n", taxcharge);
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Vehicle Charge: $25\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Total Charge: $%d\n", totalcharge);
							        strcat(str, string);
									ShowPlayerDialog(playerid, DIALOG_TOLLBOOTH, DIALOG_STYLE_MSGBOX, "{FFFFFF}LA-LV Tollbooth", str, "Accept", "Reject");
									PlayerInfo[playerid][pTollBoothCharge] = totalcharge;
						        }
						        else
						        {
					                // Charge Calculations
							        new taxcharge = floatround(((15 * TaxValue)/100), floatround_ceil);
							        new totalcharge = taxcharge + 15;

							        format(string, sizeof(string), "{00FF00}Los Angeles - Las Vegas Toll Booth Charge\n\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Vehicle Type: Heavy Vehicle without Trailer\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Tax Charge: $%d\n", taxcharge);
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Vehicle Charge: $15\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Total Charge: $%d\n", totalcharge);
							        strcat(str, string);
									ShowPlayerDialog(playerid, DIALOG_TOLLBOOTH, DIALOG_STYLE_MSGBOX, "{FFFFFF}LA-LV Tollbooth", str, "Accept", "Reject");
									PlayerInfo[playerid][pTollBoothCharge] = totalcharge;
						        }
						    }
						    else // It's something else (Normal Car) or CopCar
						    {

						        if(IsTrailerAttachedToVehicle(carid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
						        {
					                // Charge Calculations
							        new taxcharge = floatround(((15 * TaxValue)/100), floatround_ceil);
							        new totalcharge = taxcharge + 15;

							        format(string, sizeof(string), "{00FF00}Los Angeles - Las Vegas Toll Booth Charge\n\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Vehicle Type: Standard Vehicle and Trailer\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Tax Charge: $%d\n", taxcharge);
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Vehicle Charge: $15\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Total Charge: $%d\n", totalcharge);
							        strcat(str, string);
									ShowPlayerDialog(playerid, DIALOG_TOLLBOOTH, DIALOG_STYLE_MSGBOX, "{FFFFFF}LA-LV Tollbooth", str, "Accept", "Reject");
									PlayerInfo[playerid][pTollBoothCharge] = totalcharge;
						        }//check for pd vehicles
						        else if(IsACopCar(carid) || IsAnLVMPDCar(carid) || IsAnMPSCar(carid) || IsAFBICar(carid) || IsAnAmbulance(carid) || IsAnCHPCar(carid) || IsAnSASDCar(carid) || IsAnDOCCar(carid)
								|| IsAPersonalCopCar(carid) || GetPlayerColor(playerid) == COLOR_VIP)
								{
								    new ClosestTollObject = GetClosestTollObject(playerid);
						            new Float:X, Float:Y, Float:Z, Float:RX, Float:RY, Float:RZ;
						            GetDynamicObjectPos(ClosestTollObject, X, Y, Z);
						            GetDynamicObjectRot(ClosestTollObject, RX, RY, RZ);
						            MoveDynamicObject(ClosestTollObject, X, Y, Z, 1, RX, 0.0, RZ);

									SendClientMessageEx(playerid, COLOR_YELLOW, "Your EZPass Fleet Transponder has automatically let you through the toll booth.");
						            SetTimerEx("ResetTollBoothObject", 5000, 0, "ii", playerid, ClosestTollObject);
						            PlayerInfo[playerid][pAtTollBooth] = 1;
						            SetTimerEx("ResetTollBoothMenu", 5000, 0, "i", playerid);
								}
						        else
						        {
					                // Charge Calculations
							        new taxcharge = floatround(((10 * TaxValue)/100), floatround_ceil);
							        new totalcharge = taxcharge + 10;

							        format(string, sizeof(string), "{00FF00}Los Angeles - Las Vegas Toll Booth Charge\n\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Vehicle Type: Standard Vehicle\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Tax Charge: $%d\n", taxcharge);
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Vehicle Charge: $10\n");
							        strcat(str, string);
							        format(string, sizeof(string), "{FFFFFF}Total Charge: $%d\n", totalcharge);
							        strcat(str, string);
									ShowPlayerDialog(playerid, DIALOG_TOLLBOOTH, DIALOG_STYLE_MSGBOX, "{FFFFFF}LA-LV Tollbooth", str, "Accept", "Reject");
									PlayerInfo[playerid][pTollBoothCharge] = totalcharge;
						        }
						    }
						}
					}
					else if(TollShutdown == 1 && (IsAGovernmentFaction(playerid)))
					{
					    new ClosestTollObject = GetClosestTollObject(playerid);
			            new Float:X, Float:Y, Float:Z, Float:RX, Float:RY, Float:RZ;
			            GetDynamicObjectPos(ClosestTollObject, X, Y, Z);
			            GetDynamicObjectRot(ClosestTollObject, RX, RY, RZ);
			            MoveDynamicObject(ClosestTollObject, X, Y, Z, 1, RX, 0.0, RZ);

						SendClientMessageEx(playerid, COLOR_YELLOW, "You have been let through the shutdown toll booth.");
			            SetTimerEx("ResetTollBoothObject", 5000, 0, "ii", playerid, ClosestTollObject);
			            PlayerInfo[playerid][pAtTollBooth] = 1;
			            SetTimerEx("ResetTollBoothMenu", 5000, 0, "i", playerid);
			            PlayerInfo[playerid][pAtTollBooth] = 1;
					}
					else if(TollShutdown == 1 && !IsAGovernmentFaction(playerid))
					{
					    PlayerInfo[playerid][pAtTollBooth] = 1;
					    SendClientMessageEx(playerid, COLOR_GRAD2, "  The Toll Booth has been shutdown by the Police, you are not allowed through at this time.");
                        SetTimerEx("ResetTollBoothMenu", 5000, 0, "i", playerid);
					}
				}
	        }
	    }
	}
2#
Код:
// Timer Name: ServerHeartbeatTwo()
// TickRate: 1 secs.
ptask ServerHeartbeatTwo[1000](playerid)
{
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new myweapons[13][2];
	//new szMessage[128];
	if(GetPVarInt(playerid, "IsInArena") == -1)
	{
		for (new i = 0; i < 13; i++)
		{
			GetPlayerWeaponData(playerid, i, myweapons[i][0], myweapons[i][1]);
			if(PlayerInfo[playerid][pGuns][i] == myweapons[i][0])
			{
			    PlayerInfo[playerid][pGunAmmo][i] = myweapons[i][1];
   				//format(szMessage, sizeof(szMessage), "* %s has ran out of ammo.", GetPlayerNameEx(playerid));//ran out of ammo check
			   // ProxDetector(25.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
		}
	}
	if(GetPVarInt(playerid, "IsOnFire") && !CanPlayerBurn(playerid, 1))
	{
		TogglePlayerBurning(playerid, false);
	}
	if(CanPlayerBurn(playerid) && IsAtFire(playerid))
		{
			TogglePlayerBurning(playerid, true);
		}
		#if defined BurnOthers
		new Float:x, Float:y, Float:z;
		for(new i; i < MAX_PLAYERS; i++)
	  	{
	  	    if(playerid != i && IsPlayerConnected(i) && !IsPlayerNPC(i))
		  	{
			  	if(CanPlayerBurn(i) && GetPVarInt(playerid, "IsOnFire") && !GetPVarInt(i, "IsOnFire"))
	  	    	{
				  	GetPlayerPos(i, x, y, z);
					if(IsPlayerInRangeOfPoint(playerid, BURNING_RADIUS, x, y, z))
					{
					    TogglePlayerBurning(i, true);
					}
				}
			}
		}
		#endif
	if(IsPlayerInAnyVehicle(playerid)) {
		SetPlayerArmedWeapon(playerid, 0);
	}
	if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK && JetPack[playerid] == 0 && PlayerInfo[playerid][pAdmin] < 4)
	{
		new string[74 + MAX_PLAYER_NAME];
	    format( string, sizeof( string ), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) possibly just loaded s0biet and gave himself a fucking jetpack...Faggot", GetPlayerNameEx(playerid), playerid);
		ABroadCast( COLOR_YELLOW, string, 2 );
		format(string, sizeof(string), "%s (ID %d) may possibly be jetpack hacking.", GetPlayerNameEx(playerid), playerid);
		Log("logs/hack.log", string);
	}
	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) for(new h = 0; h < sizeof(FamilyInfo); h++)
	{
		if(IsPlayerInRangeOfPoint(playerid, 2.0, FamilyInfo[h][FamilySafe][0], FamilyInfo[h][FamilySafe][1], FamilyInfo[h][FamilySafe][2]))
		{
			if(FamilyInfo[h][FamilyUSafe] == 1)
			{
				GameTextForPlayer(playerid, "~y~gang safe~w~~n~Type ~r~/safehelp~w~ for more information", 5000, 3);
			}
		}
	}
	if(GetPlayerState(playerid) == 1 && IsPlayerInRangeOfPoint(playerid,2.0, -1608.8733,1284.3466,7.1777) || IsPlayerInRangeOfPoint(playerid,2.0, 2101.7676,-1885.9995,13.5469) || IsPlayerInRangeOfPoint(playerid,2.0, 534.2360,913.0679,-42.9609))
	{
		if(PlayerInfo[playerid][pJob] == 24)
		{
			new string[128];
		    format(string, sizeof(string), "~y~Materials Bank~n~Materials storage: ~r~%d ~n~~w~You can restock in San Fierro", matssys[MatsAmmount]);
		    GameTextForPlayer(playerid, string, 5000, 3);
		}
		else if(PlayerInfo[playerid][pJob] != 24)
		{
			new string[128];
		    format(string, sizeof(string), "~y~Materials Bank~n~Materials storage: ~r~%d", matssys[MatsAmmount]);
		    GameTextForPlayer(playerid, string, 5000, 3);
		}
		else if(PlayerInfo[playerid][pJob] == 9)
		{
			new string[128];
		    format(string, sizeof(string), "~y~Materials Bank~n~Materials storage: ~r~%d ~n~~w~You can ~g~/getmats ~w~in Los Angeles", matssys[MatsAmmount]);
		    GameTextForPlayer(playerid, string, 5000, 3);
		}
	}
	if(GetPlayerState(playerid) == 1 && IsPlayerInRangeOfPoint(playerid,2.0,325.6044,1123.5282,1083.8828))
	{
		if(PlayerInfo[playerid][pJob] == 14)
		{
			new string[128];
		    format(string, sizeof(string), "~y~Drug House (Pot): %d~n~~y~Drug House (Crack): %d", drugsys[DrugPotAmmount], drugsys[DrugCrackAmmount]);
			GameTextForPlayer(playerid, string, 5000, 3);
		}
		else if(PlayerInfo[playerid][pJob] == 4)
		{
			new string[128];
			format(string, sizeof(string), "~y~Drug House (Pot): %d~n~~y~Drug House (Crack): %d~n~~w~You can /getpot && /getcrack here", drugsys[DrugPotAmmount], drugsys[DrugCrackAmmount]);
			GameTextForPlayer(playerid, string, 5000, 3);
		}
		else
		{
			new string[128];
		    format(string, sizeof(string), "~y~Drug House (Pot): %d~n~~y~Drug House (Crack): %d", drugsys[DrugPotAmmount], drugsys[DrugCrackAmmount]);
			GameTextForPlayer(playerid, string, 5000, 3);
		}
	}
	if(GetPlayerState(playerid) == 1 && IsPlayerInRangeOfPoint(playerid,2.0,-51.4929,1398.0430,1084.4297))
	{
		new string[128];
		format(string, sizeof(string), "~y~Type ~r~/cookheroin~n~~y~to begin cooking your heroin!");
		GameTextForPlayer(playerid, string, 5000, 3);
	}
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInRangeOfPoint(playerid,2.0,-1584.3499,-2718.8491,48.5391))
	{
		new string[128];
		format(string, sizeof(string), "~y~Type ~r~/opengarage ~y~to enter the garage.");
		GameTextForPlayer(playerid, string, 5000, 3);
	}
	for(new h = 0; h < sizeof(Points); h++)
	{
		if(IsPlayerInRangeOfPoint(playerid, 2.0, Points[h][Pointx], Points[h][Pointy], Points[h][Pointz]))
		{
			if(Points[h][Type] == 1 && GetPVarInt(playerid, "Packages") == 0)
			{
				GameTextForPlayer(playerid, "~w~Type /getmats to purchase a ~n~~r~materials package", 5000, 5);
			}
			else if(Points[h][Type] == 3 && PlayerInfo[playerid][pPot] < 3)
			{
				GameTextForPlayer(playerid, "~w~Type /getseeds to purchase some ~r~pot seeds", 5000, 5);
			}
		}
	}
	if(SafeTime[playerid] > 0) {
		if(--SafeTime[playerid] == 1 && gPlayerAccount[playerid] == 1 && gPlayerLogged{playerid} == 0) {
			SendClientMessageEx(playerid, COLOR_WHITE, "HINT: You can now login by typing your password below.");
		}
	}
	if(PlayerInfo[playerid][pLocal] != 255 && PlayerInfo[playerid][pInt] != 0)
	{
		new house = PlayerInfo[playerid][pLocal];
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		if(oldposz != 0.0)
		{
			if(oldposz < 600.0)
			{
				if(house == 242)
				{
					SetPlayerInterior(playerid,0);
					SetPlayerPos(playerid,1073.0619,-344.5148,73.9922);
					PlayerInfo[playerid][pInt] = 0;
					PlayerInfo[playerid][pLocal] = 255;
				}
			}
		}
	}
	if(CellTime[playerid] > 0)
	{
		if (CellTime[playerid] == cchargetime)
		{
			CellTime[playerid] = 1;
			if(Mobile[Mobile[playerid]] == playerid)
			{
				CallCost[playerid] += callcost;
			}
		}
		CellTime[playerid]++;
		if (Mobile[Mobile[playerid]] == INVALID_PLAYER_ID && CellTime[playerid] == 5)
		{
			if(IsPlayerConnected(Mobile[playerid]))
			{
			    new Float:rX, Float:rY, Float:rZ;
			    GetPlayerPos(playerid, rX, rY, rZ);
				new string[18 + MAX_PLAYER_NAME];
				format(string, sizeof(string), "* %s's phone rings.", GetPlayerNameEx(Mobile[playerid]));
				RingTone[Mobile[playerid]] = 10;
				ProxDetector(30.0, Mobile[playerid], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
		}
	}
	if(CellTime[playerid] == 0 && CallCost[playerid] > 0)
	{
		new string[28];
		format(string, sizeof(string), "~w~The call cost~n~~r~$%d",CallCost[playerid]);
		GivePlayerCash(playerid, -CallCost[playerid]);
		GameTextForPlayer(playerid, string, 5000, 1);
		CallCost[playerid] = 0;
	}
	if(TransportDriver[playerid] < 999)
	{
		if(GetPlayerVehicleID(playerid) != GetPlayerVehicleID(TransportDriver[playerid]) || !TransportDuty[TransportDriver[playerid]])
		{
			if(IsPlayerConnected(TransportDriver[playerid]))
			{
				TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
				TransportTime[TransportDriver[playerid]] = 0;
				TransportCost[TransportDriver[playerid]] = 0;
				new string[36];
				format(string, sizeof(string), "~w~Passenger left~n~~g~Earned $%d",TransportCost[playerid]);
				GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
				TransportDriver[playerid] = 999;
			}
		}
		else if(TransportTime[playerid] >= 16)
		{
			TransportTime[playerid] = 1;
			if(TransportDriver[playerid] < 999)
			{
				if(IsPlayerConnected(TransportDriver[playerid]))
				{
  					TransportCost[playerid] += TransportValue[TransportDriver[playerid]];
					TransportCost[TransportDriver[playerid]] = TransportCost[playerid];
				}
			}
		}
		TransportTime[playerid] += 1;
		new string[24];
		format(string, sizeof(string), "~r~%d ~w~: ~g~$%d",TransportTime[playerid],TransportCost[playerid]);
		GameTextForPlayer(playerid, string, 15000, 6);
		if(TransportCost[playerid] > GetPlayerCash(playerid))
		{
		    //RemovePlayerFromVehicle(playerid);
		    new Float:slx, Float:sly, Float:slz;
			GetPlayerPos(playerid, slx, sly, slz);
			SetPlayerPos(playerid, slx, sly, slz + 2);
		    GameTextForPlayer(playerid, "~r~You're flat out of cash!", 4000, 4);
		}
	}
	if(GetPVarInt(playerid, "rccam") == 0)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 594)
		{
 			DestroyVehicle(GetPVarInt(playerid, "rcveh"));
     		KillTimer(GetPVarInt(playerid, "rccamtimer"));
		}
	}
}
Reply


Messages In This Thread
Account save problem - by IndependentGaming - 25.04.2014, 12:48
Re: Account save problem - by IndependentGaming - 27.04.2014, 10:53
Re: Account save problem - by IndependentGaming - 27.04.2014, 15:58
Re: Account save problem - by IndependentGaming - 27.04.2014, 16:04
Re: Account save problem - by gtakillerIV - 27.04.2014, 16:45
Re: Account save problem - by IndependentGaming - 28.04.2014, 10:46
Re: Account save problem - by gtakillerIV - 28.04.2014, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)