Spawnchange - 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: Spawnchange (
/showthread.php?tid=135011)
Spawnchange -
Razvann - 18.03.2010
pawn Код:
if(IsAnInstructor(playerid)) //Driving/Flying School spawn
{
if(SchoolSpawn[playerid] == 0)
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, -2032.6810,-117.4816,1035.1719);
SetPlayerFacingAngle(playerid, 275.1114);
SetPlayerInterior(playerid,3);
PlayerInfo[playerid][pInt] = 3;
}
else if(SchoolSpawn[playerid] == 1)
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, 414.4144,2531.9580,19.1565);
SetPlayerFacingAngle(playerid, 4.6505);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else if(SchoolSpawn[playerid] == 2)
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, myx,y,z coords);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
return 1;
}
And the command:
http://pastebin.com/bpBNrA4g
It doesen't work for SchoolSpawn 2, how can I make to work for schoolspawn 2?
Re: Spawnchange -
Brian_Furios - 18.03.2010
pawn Код:
if(IsAnInstructor(playerid))
{
if(SchoolSpawn[playerid] == 0)
{
SetPlayerPos(playerid, x,y,z);
SetPlayerFacingAngle(playerid, your angle);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You will now spawn at the Flying School !");
}
else if(SchoolSpawn[playerid] == 1)
{
SetPlayerPos(playerid, x,y,z);
SetPlayerFacingAngle(playerid, your angle);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You will now spawn at the Driving School in San Fierro !");
}
else if(SchoolSpawn[playerid] != 2)
{
SetPlayerPos(playerid, x,y,z);
SetPlayerFacingAngle(playerid, your angle);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You will now spawn at the Driving School in Los Sanots !");
}
}
you can try in this mode
Re: Spawnchange -
FoxtrotZulu - 18.03.2010
I recommend checking the player's variables under the OnPlayerConnect callback, and then using SetSpawnInfo accordingly.
https://sampwiki.blast.hk/wiki/SetSpawnInfo
Re: Spawnchange -
Razvann - 18.03.2010
Doesen't work