Help with Server -
gonzalo120 - 02.11.2013
How can i change the spawn point of a newbie player, So, when he / she connects to server, spawns on a part of map, so i want to change it to other part of Los Santos
Re: Help with Server -
Keyhead - 02.11.2013
pawn Код:
SetPlayerPos(playerid, x,y,z);
You can also
pawn Код:
SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
Respuesta: Re: Help with Server -
gonzalo120 - 02.11.2013
Quote:
Originally Posted by Keyhead
pawn Код:
SetPlayerPos(playerid, x,y,z);
|
And, Where i can get the pos i want to players spawns....
Re: Help with Server -
Beckett - 02.11.2013
You got two choices, either
AddPlayerClass or
SetPlayerPos(playerid,xpos,ypos,zpos); you can get the XYZ(spawn point) by going to it ingame and then type /save [COMMENT] <<
this is optional.
http://prntscr.com/21fwus
If you want to use AddPlayerClass then go to Documents > GTA SA user files > samp > savedposition ^ as shown above in the image then go to savedposition, copy the whole line
Код:
Example:
AddPlayerClass(107,2511.7729,-1678.3658,13.5469,45.2197,0,0,0,0,0,0);
After that go to pawno.exe, open your gamemode, press CTRL + F write OnGameModeinit you will see this
Код:
public OnGameModeInit()
{
AddPlayerClass(107,2511.7729,-1678.3658,13.5469,45.2197,0,0,0,0,0,0);
return 1;
}
At the begin of the bracket ^ paste your code
Respuesta: Re: Help with Server -
gonzalo120 - 02.11.2013
Quote:
Originally Posted by DaniceMcHarley
You got two choices, either AddPlayerClass or SetPlayerPos(playerid,xpos,ypos,zpos); you can get the XYZ(spawn point) by going to it ingame and then type /save [COMMENT] << this is optional.
http://prntscr.com/21fwus
If you want to use AddPlayerClass then go to Documents > GTA SA user files > samp > savedposition ^ as shown above in the image then go to savedposition, copy the whole line
Код:
Example:
AddPlayerClass(107,2511.7729,-1678.3658,13.5469,45.2197,0,0,0,0,0,0);
After that go to pawno.exe, open your gamemode, press CTRL + F write OnGameModeinit you will see this
Код:
public OnGameModeInit()
{
AddPlayerClass(107,2511.7729,-1678.3658,13.5469,45.2197,0,0,0,0,0,0);
return 1;
}
At the begin of the bracket ^ paste your code
|
Thats, the pos i want 299,1814.3000,-1373.2000,15.0781 i dont think if its that 299,1814.3000,-1373.2000,15.0781
or that AddPlayerClass(299,1814.3000,-1373.2000,15.0781,270.7000,0,0,0,0,0,0); //
Help, how can i add it then!
Re: Help with Server -
Beckett - 02.11.2013
As I said, you copy the XYZ only if you wanna use SetPlayerPos, but now just take this
AddPlayerClass(299,1814.3000,-1373.2000,15.0781,270.7000,0,0,0,0,0,0); and paste it under
OnGamemodeinit
Respuesta: Re: Help with Server -
gonzalo120 - 02.11.2013
Quote:
Originally Posted by DaniceMcHarley
As I said, you copy the XYZ only if you wanna use SetPlayerPos, but now just take this AddPlayerClass(299,1814.3000,-1373.2000,15.0781,270.7000,0,0,0,0,0,0); and paste it under OnGamemodeinit
|
But under OnGamemodeinit dont have that example you gave me, i have that, see it...
public OnGameModeInit()
{
ManualVehicleEngineAndLights();
DisableInteriorEnterExits();
/* ConnectNPC("Security_Guard","npcidle");
ConnectNPC("Banker","npcidle");
ConnectNPC("Bot_24","npcidle");
ConnectNPC("Bot_24_1","npcidle");
ConnectNPC("Bot_24_2","npcidle");
ConnectNPC("Bot_24_3","npcidle");
ConnectNPC("bot_10gb","npcdle");
ConnectNPC("bot_pigpen","npcidle");
ConnectNPC("bot_stripper1","npcidle");
ConnectNPC("bot_stripper2","npcidle");
ConnectNPC("Boxer","npcidle");
ConnectNPC("bot_donut","train_ls");
ConnectNPC("Bus","Bus");
ConnectNPC("Barman","npcidle");
ConnectNPC("Janet","npcidle");
ConnectNPC("Denise","npcidle");*/
print("Stage 1");
SetNameTagDrawDistance(30.0);
SendRconCommand("loadfs gates");
EnableStuntBonusForAll(0);
Re: Help with Server -
rappy93 - 02.11.2013
pawn Код:
public OnGameModeInit()
{
ManualVehicleEngineAndLights();
DisableInteriorEnterExits();
/* ConnectNPC("Security_Guard","npcidle");
ConnectNPC("Banker","npcidle");
ConnectNPC("Bot_24","npcidle");
ConnectNPC("Bot_24_1","npcidle");
ConnectNPC("Bot_24_2","npcidle");
ConnectNPC("Bot_24_3","npcidle");
ConnectNPC("bot_10gb","npcdle");
ConnectNPC("bot_pigpen","npcidle");
ConnectNPC("bot_stripper1","npcidle");
ConnectNPC("bot_stripper2","npcidle");
ConnectNPC("Boxer","npcidle");
ConnectNPC("bot_donut","train_ls");
ConnectNPC("Bus","Bus");
ConnectNPC("Barman","npcidle");
ConnectNPC("Janet","npcidle");
ConnectNPC("Denise","npcidle");*/
print("Stage 1");
SetNameTagDrawDistance(30.0);
SendRconCommand("loadfs gates");
EnableStuntBonusForAll(0);
AddPlayerClass(299,1814.3000,-1373.2000,15.0781,270.7000,0,0,0,0,0,0); // this here
Re: Help with Server -
Beckett - 02.11.2013
Oh I thought you're using a blank gamemode, then just put it as
rappy said!
Respuesta: Help with Server -
gonzalo120 - 02.11.2013
And i need to remove the other spawn?, so the first i want to change?