25.07.2013, 06:19
I am VERY new to scripting.
Well, this is pretty simple. When I put them into my script, I can run the server, log into game, but as soon as I am in-game, my character freezes and whole GTA SA freezes and I have to alt-tab and Task Manager close out of it.
My removebuildingforplayer lines are like this:
(Note, I only added 4 into this code below but in fact there is a total of like 783 lines. The ending and beginning are displayed below. Please help.)
Please help?
Well, this is pretty simple. When I put them into my script, I can run the server, log into game, but as soon as I am in-game, my character freezes and whole GTA SA freezes and I have to alt-tab and Task Manager close out of it.
My removebuildingforplayer lines are like this:
(Note, I only added 4 into this code below but in fact there is a total of like 783 lines. The ending and beginning are displayed below. Please help.)
Код:
public OnPlayerConnect(playerid) { new string[128]; if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Login","Welcome back to CHANGEME.\n\nThat name is registered. Please enter your password below.","Login","Quit"); //login format(string, sizeof(string), ""COL_WHITE"Welcome back to "COL_YELLOW"CHANGEME, "COL_WHITE"%s!", GetPlayerFirstName(playerid)); SendClientMessage(playerid, -1, string); } else { ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Register","Welcome to CHANGEME.\n\nPlease register your account by typing the password below.","Register","Quit"); format(string, sizeof(string), ""COL_WHITE"Welcome to "COL_YELLOW"CHANGEME, "COL_WHITE"%s!", GetPlayerFirstName(playerid)); SendClientMessage(playerid, -1, string); } if(!IsValidName(playerid) && !IsPlayerNPC(playerid) && PlayerInfo[playerid][pAdmin] < 2) { format(string, sizeof(string), "AdmCmd: %s has been kicked by NameChecker, reason: Invalid name format.", GetName(playerid)); SendClientMessage(playerid, COLOR_LIGHTRED, "You've been kicked by NameChecker, reason: Invalid name format. (Firstname_Lastname)"); Kick(playerid); } SetPlayerInterior(playerid,0); TogglePlayerSpectating(playerid, 1); gPlayerLogged[playerid] = 1; return 1; RemoveBuildingForPlayer(playerid, 16273, 422.9141, 1513.4141, 10.7188, 0.25); RemoveBuildingForPlayer(playerid, 16274, 435.0547, 1269.6875, 8.6953, 0.25); RemoveBuildingForPlayer(playerid, 1308, 672.9922, 1754.1484, 3.4531, 0.25); RemoveBuildingForPlayer(playerid, 1308, 684.0234, 1740.7969, 5.2500, 0.25); return 1; }
![Cheesy](images/smilies/biggrin.png)