SA-MP Forums Archive
Will this small code work? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Will this small code work? (/showthread.php?tid=165854)



Will this small code work? - Criss_Angel - 06.08.2010

Код:
public OnPlayerSpawn(playerid)
{
	new pname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pname, sizeof(pname));
	if(gTeam[playerid] == TEAM_WS) SetSpawnInfo(playerid, TEAM_WS, 271, 1667.8909, 1405.5618, 10.7801, 0.0, 448, 300, 355, 300, 358, 300); SpawnPlayer(playerid);
	if(gTeam[playerid] == TEAM_A11) SetSpawnInfo(playerid, TEAM_A11, 270, 1667.8909, 1405.5618, 10.7801, 0.0, 448, 300, 355, 300, 358, 300); SpawnPlayer(playerid);
	if(gTeam[playerid] == TEAM_EC) SetSpawnInfo(playerid, TEAM_EC, 269, 689.1548,-1275.1447,13.5590, 0.0, 448, 300, 355, 300, 358, 300); SpawnPlayer(playerid);
	return 1;
}
its supposed to well assign it that if ur in this clan ull always spawn in the clans hq (coordinates not set yet)


Re: Will this small code work? - willsuckformoney - 06.08.2010

yeah

pawn Код:
public OnPlayerSpawn(playerid)
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    if(gTeam[playerid] == TEAM_WS)
        {
                SetPlayerPos(playerid, 1667.8909, 1405.5618, 10.7801);
        }
    if(gTeam[playerid] == TEAM_A11)
        {
                SetPlayerPos(playerid, 1667.8909, 1405.5618, 10.7801);
        }
    if(gTeam[playerid] == TEAM_EC)
        {
                SetPlayerPos(playerid, 689.1548,-1275.1447,13.5590);
        }
    return 1;
}
something like that^^


EDIT:
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));

may not be needed if that spawn stuff is there only


Re: Will this small code work? - Cameltoe - 06.08.2010

Instead of asking if it will work, why don't u go ahead and test? debug, and you will get it working.

Use the little snippet that wsfm wrote for u that should work just fine


Re: Will this small code work? - Criss_Angel - 06.08.2010

ty, i also have a prob where the class selection is near the lv escalutors (defualt) but i cant see the players


Re: Will this small code work? - Cameltoe - 06.08.2010

Quote:
Originally Posted by Criss_Angel
Посмотреть сообщение
ty, i also have a prob where the class selection is near the lv escalutors (defualt) but i cant see the players
Go to the filterscript section and search for class maker works 100% and is a really great script. i will edit this when i find one

EDIT: http://forum.sa-mp.com/showthread.ph...ght=ClassMaker Credz to Ryder for making it