Die on loggin? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Die on loggin? (
/showthread.php?tid=385491)
Die on loggin? -
Laure - 16.10.2012
I have a big problem in my script when ever i log i spawn at a place called Palomono Creek and then die how is that happening it happens with all players.
AW: Die on loggin? -
BiosMarcel - 16.10.2012
We can't say you why when we don't have your source code (or not?)
Re: Die on loggin? -
Laure - 16.10.2012
Hmm so i need to post the source code of OnPlayerConnect or what?
Re: Die on loggin? -
TzAkS. - 16.10.2012
Your spawn place is there?
If not post your server.log,i want to see something.
Re: Die on loggin? -
Laure - 16.10.2012
Alright here you go:
Код:
SA-MP Dedicated Server
----------------------
v0.3e-R2, ©2005-2012 SA-MP Team
[13:26:50]
[13:26:50] Server Plugins
[13:26:50] --------------
[13:26:50] Loading plugin: streamer.dll
[13:26:50]
*** Streamer Plugin v2.5.2 by Incognito loaded ***
[13:26:50] Loaded.
[13:26:50] Loading plugin: sscanf.dll
[13:26:50]
[13:26:50] ===============================
[13:26:50] sscanf plugin loaded.
[13:26:50] © 2009 Alex "******" Cole
[13:26:50] ===============================
[13:26:50] Loaded.
[13:26:50] Loading plugin: audio.dll
[13:26:50]
*** Audio Plugin v0.5 R2 by Incognito loaded ***
[13:26:50] Loaded.
[13:26:50] Loading plugin: Whirlpool
[13:26:50]
[13:26:50] ==================
[13:26:50]
[13:26:50] Whirlpool loaded
[13:26:50]
[13:26:50] ==================
[13:26:50]
[13:26:50] Loaded.
[13:26:50] Loading plugin: sscanf
[13:26:50]
[13:26:50] ===============================
[13:26:50] sscanf plugin loaded.
[13:26:50] © 2009 Alex "******" Cole
[13:26:50] ===============================
[13:26:50] Loaded.
[13:26:50] Loading plugin: xml
[13:26:50] Loaded.
[13:26:50] Loading plugin: nativechecker.dll
[13:26:50] Loaded.
[13:26:50] Loaded 7 plugins.
[13:26:50]
[13:26:50] Filterscripts
[13:26:50] ---------------
[13:26:50] Loading filterscript 'Firework.amx'...
[13:26:50] Loading filterscript 'gcustom.amx'...
[13:26:50] Loading filterscript 'buttons.amx'...
[13:26:50] Loading filterscript 'audio.amx'...
[13:26:50] *** Audio_SetPack: Error opening "audiopacks/default_pack/example.mp3" for CRC check
[13:26:50] *** Audio_SetPack: Error opening "audiopacks/default_pack/example.ogg" for CRC check
[13:26:50] *** Audio_SetPack: Error opening "audiopacks/default_pack/example.wav" for CRC check
[13:26:50] *** Audio_SetPack: Audio pack set to "default_pack" (transferable and automated)
[13:26:50] Loading filterscript 'maploader.amx'...
[13:26:50] MTA Map Loader by Chaser98 loaded
[13:26:50] Loading filterscript 'F_Streamer.amx'...
[13:26:50] F_Streamer Loaded successful.
[13:26:50] Loaded 6 filterscripts.
[13:26:50] *** Audio Plugin: Started TCP server on port 7777
[13:26:50]
[13:26:50] =======================================
[13:26:50] | |
[13:26:50] | YSI version 1.03.0011 |
[13:26:50] | By Alex "******" Cole |
[13:26:50] | |
[13:26:50] | Checking the latest YSI version.. |
[13:26:50] | |
[13:26:50] =======================================
[13:26:50]
[13:26:50] onfoot_rate = 40 (int, read-only)
[13:26:50] incar_rate = 40 (int, read-only)
[13:26:50] weapon_rate = 40 (int, read-only)
[13:26:50] *** Audio_SetPack: Error opening "audiopacks/default_pack/example.mp3" for CRC check
[13:26:50] *** Audio_SetPack: Error opening "audiopacks/default_pack/example.ogg" for CRC check
[13:26:50] *** Audio_SetPack: Error opening "audiopacks/default_pack/example.wav" for CRC check
[13:26:50] *** Audio_SetPack: Audio pack set to "default_pack" (transferable and automated)
[13:26:51] Incoming connection: 192.168.1.1:13674
[13:27:42] [script] 3DTEXTDRAW LIMIT: 1024 (Static, non-streamed) | 3DTEXTDRAW COUNT: 1607
[13:27:42] [script] PICKUP LIMIT: 4096 (Static, non-streamed) | PICKUP COUNT: 1468
[13:27:42] [script] OBJECT LIMIT: 1000 (Static, non-streamed) | OBJECT COUNT: 9495
[13:27:42]
[13:27:42] -------------------------------------------
[13:27:42] Loading...
[13:27:42] Welcome to X Generation Roleplay
[13:27:42] -------------------------------------------
[13:27:42]
[13:27:42] Number of vehicle models: 88
[13:27:42] [join] Casper_Einstein has joined the server (0:192.168.1.1)
[13:27:42]
[13:27:42] =======================================
[13:27:42] | |
[13:27:42] | Error: Could not connect to YSI |
[13:27:42] | update server (response was 001). |
[13:27:42] | |
[13:27:42] =======================================
Re: Die on loggin? -
TzAkS. - 16.10.2012
Is not there the problem,post here OnPlayerSpawn
Re: Die on loggin? -
Laure - 16.10.2012
Ok, Here:
Код:
public OnPlayerSpawn(playerid)
{
if(!gPlayerLogged{playerid})
{
SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!");
Kick(playerid);
return 1;
}
Streamer_Update(playerid);
if(GetPVarInt(playerid, "NGPassenger") == 1)
{
new Float:X, Float:Y, Float:Z;
GetVehiclePos(GetPVarInt(playerid, "NGPassengerVeh"), X, Y, Z);
SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
SetPlayerWeaponsEx(playerid);
GivePlayerValidWeapon(playerid, 46, 60000);
SetPlayerSkin(playerid, GetPVarInt(playerid, "230"));
SetPlayerHealth(playerid, GetPVarFloat(playerid, "100"));
SetPlayerArmour(playerid, GetPVarFloat(playerid, "100"));
DeletePVar(playerid, "NGPassenger");
DeletePVar(playerid, "NGPassengerVeh");
DeletePVar(playerid, "NGPassengerArmor");
DeletePVar(playerid, "NGPassengerHP");
DeletePVar(playerid, "NGPassengerSkin");
return 1;
}
if(InsideShamal[playerid] != INVALID_VEHICLE_ID)
{
SetPlayerPos(playerid, GetPVarFloat(playerid, "air_Xpos"), GetPVarFloat(playerid, "air_Ypos"), GetPVarFloat(playerid, "air_Zpos"));
SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "air_Rpos"));
SetPlayerHealth(playerid, GetPVarFloat(playerid, "air_HP"));
SetPlayerArmour(playerid, GetPVarFloat(playerid, "air_Arm"));
SetPlayerWeaponsEx(playerid);
SetPlayerToTeamColor(playerid);
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
DeletePVar(playerid, "air_Xpos");
DeletePVar(playerid, "air_Ypos");
DeletePVar(playerid, "air_Zpos");
DeletePVar(playerid, "air_Rpos");
DeletePVar(playerid, "air_HP");
DeletePVar(playerid, "air_Arm");
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, InsideShamal[playerid]);
return SetPlayerInterior(playerid, 1);
}
SyncPlayerTime(playerid);
if(IsPlayerNPC(playerid)) return 1;
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
STDPlayer[playerid] = 0;
gTeam[playerid] = PlayerInfo[playerid][pTeam];
if(!gPlayerLogged{playerid}) return Kick(playerid);
SetPlayerSpawn(playerid);
SetPlayerWeapons(playerid);
SetPlayerToTeamColor(playerid);
CheckPH(playerid);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
return 1;
}
Re: Die on loggin? -
Abhishek. - 16.10.2012
EDIT:not seen the above post
ah your codes are spawning the player at some conditions and i think they all are false while you are spawning
dont it?
Re: Die on loggin? -
Laure - 16.10.2012
What do you mean to say?
Re: Die on loggin? -
Abhishek. - 16.10.2012
you have no codes for
if he's not
*An NPC
*Inside Shamal
*and his Var Int NGPassanger is not eqauls to one
write a SetPlayerPos();
without any if conditions else than IsPlayerLogged==1