15.05.2014, 17:05
Hello There,So There Is A Problem In My Server That When Someone Joins My Server,Server Totally Gets Freeze,I Cannot Perform Any Command Or Any Text And All Other Players Seems Like They Are Pausing.
Here Codes From PPC_House:
Codes From My GM:
Codes From LuxAdmin:
Please Help Me In This Problem. And You Will Get +REP..
Here Codes From PPC_House:
pawn Код:
public OnPlayerConnect(playerid)
{
// Setup local variables
new HouseID, HouseSlot, Name[24];
// Get the player's name
GetPlayerName(playerid, Name, sizeof(Name));
// Loop through all houses to find the ones which belong to this player
for (HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
{
// Check if the house exists
if (IsValidDynamicPickup(AHouseData[HouseID][PickupID]))
{
// Check if the house is owned
if (AHouseData[HouseID][Owned] == true)
{
// Check if the player is the owner of the house
if (strcmp(AHouseData[HouseID][Owner], Name, false) == 0)
{
// Add the HouseID to the player's account for faster reference later on
APlayerData[playerid][Houses][HouseSlot] = HouseID;
// Load housecars if they weren't loaded at FilterscriptInit
if (LoadCarsDuringFSInit == false)
HouseFile_LoadCars(HouseID);
// Select the next HouseSlot
HouseSlot++;
}
}
}
}
return 1;
}
pawn Код:
#define DIALOG_RULES2 12
#define savefolder "/Accounts/%s.ini" // This defines the file name and folder
public OnPlayerConnect(playerid)
{
new string[64], pName2[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName2,MAX_PLAYER_NAME);
format(string,sizeof string,"%s (%d) Has Joined The Server.",pName2,playerid);
GameTextForPlayer(playerid, "Welcome To The Los Santos Gang War Server", 5000, 4);
ShowPlayerDialog(playerid, DIALOG_RULES2, DIALOG_STYLE_MSGBOX, "Server Rules", "1- No Cheating\n2- No Spamming\n3- Slide Bug Is Not Allowed But C Bug Is Allowed\n4- No Rule Breaking\n5- No G Abuse\n6- No Advertising\n7- Teleport Abuse Is Not Allowed\n8- Weapon Mods Are Allowed Only\n9- Respect Player Especially Admins\n10- Scamming Is Not Allowed\n11- Aimbot Is Not Allowed\n12- Don't Try To Climb Up Over The Freeroam Walls If You Are(not) In Freeroam Mod\n\nDo You Agree The Server Rules?", "Yes", "No");
SendClientMessageToAll(0xAFAFAFAA,string);
SendClientMessage(playerid,-1,"Welcome To The {FFEA00}LOS SANTOS GANG WARS{FFFFFF} Version 2.2! Please Enjoy Your Stay.");
SendClientMessage(playerid,-1,"You Can Listen,Save,Stop,Check Your Favourite Song Or Unsave Your Song By Some Commands For It In /cmds");
SendClientMessage(playerid, 0x00EEFFFF, "Please Visit Our Forums: lsgangwars.createaforum.com");
SendClientMessage(playerid, 0x00FF22FF, "When You Spawn A Skin Type /help To See The Help Menu.");
new pname[128]; // This get's the length of the player name
new file[128]; // This get's the lenght of the file
GetPlayerName(playerid, pname, sizeof(pname)); // This get's the player name with the lenght of the player name
format(file, sizeof(file), savefolder,pname); // This describe's where to save and how to save it
if(dini_Exists(file)) { // If the file exist
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
LPinfo[playerid][Drugs] = dini_Int(file,"Drugs");
LPinfo[playerid][Adre] = dini_Int(file,"Adrenaline Pills");
BankMoney[playerid] = dini_Int(file,"BankMoney");
Favouritesong[playerid] = dini_Int(file,"SongID");
}
else {
dini_Create(file); // Create the file
dini_IntSet(file, "Score", 0); // Set's "Score"
dini_IntSet(file, "Money", 0); // Set's "Money"
dini_IntSet(file, "Drugs", LPinfo[playerid][Drugs]); // Set's "Kills"
dini_IntSet(file, "Adrenaline Pills", LPinfo[playerid][Adre]); // Set's "Kills"
dini_IntSet(file, "BankMoney", BankMoney[playerid]); // Set's "Kills"
dini_IntSet(file, "SongID", Favouritesong[playerid]); // Set's "Kills"
SetPlayerScore(playerid, dini_Int(file, "Score")); // This describes where to load the score
SetPlayerMoney(playerid, dini_Int(file, "Money")); // This describes where to load the money
// the same thing
} // This get's the length of the player name
pInfo[playerid][Last] = -1;
pInfo[playerid][NoPM] = 0;
PlayerCar[playerid] = -1;
AntiKillRowSpam[playerid] = 0;
PlayAudioStreamForPlayer(playerid, "http://s3.argim.net/files/r/gta_san_andreas_theme_song_wmm.mp3");
return 1;
}
pawn Код:
public OnFilterScriptInit()
{
if (!fexist("LuxAdmin/Config/TempBans.ban")){
new File:open = fopen("LuxAdmin/Config/TempBans.ban",io_write);
if (open) fclose(open);
}
print("\n ___________________________________________________");
print(" ");
printf(" L.A.S %s ",LVersion);
print(" -------------");
print(" LuX Administration System ");
print(" ___________________________________________________\n");
print(" -> Loading...");
CheckFolders();
UpdateConfig();
ReadTextDraws();
LoadCreatedTeles();
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
OnPlayerConnect(i);
for(new i = 1; i < MAX_CHAT_LINES; i++)
Chat[i] = "[NONE]";
for(new i = 1; i < MAX_REPORTS; i++)
Reports[i] = "[NONE]";
PingTimer = SetTimer("PingKick",5000,1);
GodTimer = SetTimer("GodModUp",2000,1);
SetTimer("WeaponCheck",800,true);
SetTimer("SaveTeleport",CTELE_TIMER,1);
SetTimer("LuxGpsSys",500,true);
ShowConfigInConsole();
new year,month,day;
getdate(year, month, day);
new hour,minute,second;
gettime(hour,minute,second);
for(new i = 0; i < sizeof(RegisterCommands) ; i++ )
RegisterCommands[i][CommandLen]=strlen(RegisterCommands[i][sCommand]);
print(" -> Loaded Successfully!\n");
printf(" Date: %d/%d/%d - Time: %d:%d:%d",day,month,year,hour, minute, second);
print(" ___________________________________________________\n");
return 1;
}