How to make player spawn at house?
#1

I used the Gagi house system at it works out great, but I just need a function to make player spawn at his house after login, instead of the usual spawn place. If someone could show me how to do this, I'd be real grateful
Reply
#2

You can use SetPVar's and could you tell me which saving system you use for user files saving?
* Could you also tell me what saving system does GagiHouse system use
Also, how much houses can a player own in your server?
Reply
#3

Well, the enums and LoadUser_data for Users and Houses are separated. So in scriptfiles, its 2 different folders And a player can own 1 house.
Reply
#4

Anyone?
Reply
#5

Quote:
Originally Posted by Strummer
Посмотреть сообщение
Anyone?
We need the code where you load the players stuff.
Reply
#6

Oh, right.

Код:
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("Sex",PlayerInfo[playerid][pSex]);
    INI_Int("Age",PlayerInfo[playerid][pAge]);
	INI_Int("Paytime",PlayerInfo[playerid][pPaytime]);
	INI_Int("Respekti",PlayerInfo[playerid][pRespekti]);
	INI_Int("Level",PlayerInfo[playerid][pLevel]);
 	INI_Int("Bank_Wealth", PlayerInfo[playerid][BankWealth]);
    INI_String("Bank_Password", PlayerInfo[playerid][BankPassword], 129);
   	INI_Int("Skin", PlayerInfo[playerid][pSkin]);
    return 1;
}
The filterscript uses Dini:

Код:
		format(file,sizeof(file),"Houses/%i.ini",i);
		if(!dini_Exists(file)) continue;
		if(dini_Exists(file))
		{
			HouseInfo[i][Name] = strval(dini_Get(file,"Name"));
			HouseInfo[i][Level] = dini_Int(file,"Level");
		    HouseInfo[i][Price] = dini_Int(file,"Price");
			HouseInfo[i][Owned] = dini_Int(file,"Owned");
			HouseInfo[i][hX] = dini_Float(file,"X");
			HouseInfo[i][hY] = dini_Float(file,"Y");
			HouseInfo[i][hZ] = dini_Float(file,"Z");
			HouseInfo[i][hVirtual] = dini_Int(file,"VirtualWorld");
			hOwner = dini_Get(file,"Owner");
			format(HouseInfo[i][Owner],24,"%s",hOwner);
As you can see, it uses a separate folder named Houses.
Reply
#7

Sorry, We cant do it, Unless if they were 1 script.
Reply
#8

Quote:
Originally Posted by Ahmad45123
Посмотреть сообщение
Sorry, We cant do it, Unless if they were 1 script.
Wrong. You could easily do that in the FS.
Reply
#9

Umm, how?
Reply
#10

Quote:
Originally Posted by sammp
Посмотреть сообщение
Wrong. You could easily do that in the FS.
You are wrong, If he did it in the filterscript, The main Gamemode will set his poistion again to the last saved one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)