Spawnchange
#1

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?
Reply
#2

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
Reply
#3

I recommend checking the player's variables under the OnPlayerConnect callback, and then using SetSpawnInfo accordingly.
https://sampwiki.blast.hk/wiki/SetSpawnInfo
Reply
#4

Doesen't work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)