Change start position
#1

I want to change start position when some register in our server, i have make /save in game

Код:
AddPlayerClass(299,1715.5994,-1903.1603,13.5664,0.9867,0,0,0,0,0,0); //Start position
Reply
#2

How to change?
Reply
#3

Can i see your public OnPlayerSpawn
Reply
#4

Quote:
Originally Posted by AchievementMaster360
Посмотреть сообщение
Can i see your public OnPlayerSpawn
Код:
public OnPlayerSpawn(playerid)
{

    /*if(IsPlayerNPC(playerid))
	{
	    new npcname[MAX_PLAYER_NAME];
	    GetPlayerName(playerid, npcname, sizeof(npcname));
	    if(!strcmp(npcname, "Bus_Driver", true))
		{
		    PutPlayerInVehicle(playerid, BusDriverVehicle, 0);
		}
		if(!strcmp(npcname, "Bus_Driver2", true))
    	{
  		 	PutPlayerInVehicle(playerid, BusDriverVehicle2, 0);
      		return 1;
    	}
		return 1;
	}*/
    if(!gPlayerLogged{playerid} && !restarting)
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!");
        Kick(playerid);
        return 1;
	}
	Streamer_Update(playerid);
	if(GetPVarInt(playerid, "NGPassenger") == 1)
	{
	    new Float:X, Float:Y, Float:Z;
	    GetVehiclePos(GetPVarInt(playerid, "NGPassengerVeh"), X, Y, Z);
	    SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
	    SetPlayerWeaponsEx(playerid);
        GivePlayerValidWeapon(playerid, 46, 60000);
        SetPlayerSkin(playerid, GetPVarInt(playerid, "NGPassengerSkin"));
        SetPlayerHealth(playerid, GetPVarFloat(playerid, "NGPassengerHP"));
        SetPlayerArmour(playerid, GetPVarFloat(playerid, "NGPassengerArmor"));
		DeletePVar(playerid, "NGPassenger");
	    DeletePVar(playerid, "NGPassengerVeh");
		DeletePVar(playerid, "NGPassengerArmor");
		DeletePVar(playerid, "NGPassengerHP");
		DeletePVar(playerid, "NGPassengerSkin");
	    return 1;
	}
Reply
#5

Код:
 Are this the coordinates you spawn in? 
SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
If so you want to replace them with this coordinates
Код:
15.5994,-1903.1603,13.5664
So the could would be
Код:
SetPlayerPos(playerid,15.5994,-1903.1603,13.5664);
//

Код:
Instead of this SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
Reply
#6

Quote:
Originally Posted by AchievementMaster360
Посмотреть сообщение
Код:
 Are this the coordinates you spawn in? 
SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
If so you want to replace them with this coordinates
Код:
15.5994,-1903.1603,13.5664
So the could would be
Код:
SetPlayerPos(playerid,15.5994,-1903.1603,13.5664);
//

Код:
Instead of this SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
Didnt work
Reply
#7

Do you have a OnPlayerRegister on the script? If so may i see it?
Reply
#8

Quote:
Originally Posted by AchievementMaster360
Посмотреть сообщение
Do you have a OnPlayerRegister on the script? If so may i see it?
Код:
forward OnPlayerRegister(playerid, password[]);
Код:
//----------------------[ OnPlayerRegister() ] -------------------------------
public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
			new string3[32];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "users/%s.ini", playername3);
			new File: hFile = fopen(string3, io_write);
			if (hFile)
			{
Код:
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerRegister(playerid,tmppass);
			}
		}
Reply
#9

Mhh im not sure ill check later sorry
Reply
#10

How i going to fix this?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)