SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 14/06/2017, 04:36 PM   #1
Join Date: Aug 2011
Posts: 772
Reputation: 6
Default Not the right spawn

Hey guys i have a dynamic faction system that will spawn me at the coords i putted on structure from DB

this is the spawn function where should read if i am or not a faction members but it spawn's me anywhere else on the map

HTML Code:
function FactionSpawn(playerid)
    if(PlayerInfo[playerid][pMember] <= 0)
        InHQ[playerid] = -1;
		SetPlayerVirtualWorld(playerid, 0);
		new SRandom = random(3);
        SetPlayerPos(playerid, RandomCivSpawns[SRandom][0], RandomCivSpawns[SRandom][1], RandomCivSpawns[SRandom][2]);
        SetPlayerFacingAngle(playerid, RandomCivSpawns[SRandom][3]);
 	if(PlayerInfo[playerid][pMember] > 0)
		new fid = PlayerInfo[playerid][pMember];
		SetPlayerInterior(playerid, DynamicFactions[fid][fInterior]);
		SetPlayerVirtualWorld(playerid, DynamicFactions[fid][fVirtual]);
		SetPlayerPos(playerid, DynamicFactions[fid][fcX], DynamicFactions[fid][fcY], DynamicFactions[fid][fcZ]);
		PlayerInfo[playerid][pInt] = DynamicFactions[fid][fInterior];
		InHQ[playerid] = fid;
	return 1;
any idea why?
StR_MaRy is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
'Corrupt Spawn' - Players crash sometimes when they spawn. Dokins Scripting Help 9 04/10/2016 09:37 PM
Spawn issue - I spawn at Blueberry after registering AndySedeyn Scripting Help 15 25/05/2014 09:44 PM
Spawn Selection textdraw and spawn music DownDuckling Scripting Help 4 14/10/2012 01:42 AM
[AJUDA] Colocar TextDraw Antes do Spawn e Após Spawn davidjnio Português/Portuguese 9 30/08/2011 06:53 PM
[Help] Object/item ectra spawn on player spawn? No-Half-Measures Help Archive 3 21/01/2010 09:38 AM

All times are GMT. The time now is 04:19 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.