Jump to content
  • 0

spawn


gabyskm96

Question

1 answer to this question

Recommended Posts

Daca folosesti modul GF trebuie sa ai ceva de genu daca nu adauga tu la setplayerspawn (functia care seteaza spawn-ul playerului)

		if(house !=255)
		{
		    if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
		    {
				SetPlayerToTeamColor(playerid);
				SetPlayerInterior(playerid,HouseInfo[house][hInt]);
				SetPlayerVirtualWorld(playerid,HouseInfo[house][hWorld]);
				SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
				PlayerInfo[playerid][pLocal] = house;
				HouseEntered[playerid] = house;
				PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
				return 1;
			}
		}
Functia [glow=red,2,300]spawnchange[/glow] iti schimba ori la spawn normal(factiune) ori la casa, uite de exemplu comanda /spawnchange (tot de pe gf)
	if(strcmp(cmd, "/spawnchange", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pPhousekey] != 255)
	        {
	            if(Spectate[playerid] != 255 && PlayerInfo[playerid][pAdmin] < 1)
	            {
	                SendClientMessage(playerid, COLOR_GREY, "   Esti spectator nu iti poti schimba spawn-ul acum !");
	                return 1;
	            }
	            if(SpawnChange[playerid])
	            {
	                SendClientMessage(playerid, COLOR_GREY, "   Deacuma vei fi spawnat la 'spawn normal' !");
	                SpawnChange[playerid] = 0;
	                if(IsAnInstructor(playerid))
		            {
		                if(SchoolSpawn[playerid] == 0)
		                {
		                    SchoolSpawn[playerid] = 1;
		                    SendClientMessage(playerid, COLOR_GREY, "   Acum vei fi spawnat la spawn-ul de zboruri !");
		                }
		                else if(SchoolSpawn[playerid] == 1)
		                {
		                    SchoolSpawn[playerid] = 0;
		                    SendClientMessage(playerid, COLOR_GREY, "   Deacuma vei fi spawnat la scoala de soferi !");
		                }
		            }
	            }
	            else
	            {
	                SendClientMessage(playerid, COLOR_GREY, "  Deacuma te vei spawna la casa dvs. sau unde aveti chirie !");
	                SpawnChange[playerid] = 1;
	            }
	        }
	        else
	        {
	            if(IsAnInstructor(playerid))
	            {
	                if(SchoolSpawn[playerid] == 0)
	                {
	                    SchoolSpawn[playerid] = 1;
	                    SendClientMessage(playerid, COLOR_GREY, "   You will now spawn at the Flying School !");
	                }
	                else if(SchoolSpawn[playerid] == 1)
	                {
	                    SchoolSpawn[playerid] = 0;
	                    SendClientMessage(playerid, COLOR_GREY, "   You will now spawn at the Driving School !");
	                }
	            }
	            else
	            {
		            SendClientMessage(playerid, COLOR_GREY, "   Nu ai chirie undeva sau nu detii o casa !");
		            return 1;
	            }
	        }
	    }
	    return 1;
	}

Normal trebuie sa definesti spawnchange iar schoolspawn reprezinta factiunea School Instructor daca o ai. In fine aici editezi/stergi cum doresti tu, e foarte simplu (eu ti-am aratat cum e pe GF)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.