22.01.2015, 19:32
I want to change the spawn point of the player in my server.
I have a login system where I found some information about the spawnings, but I didn't get the whole idea.
I found this.
This is the coordinates I want to be the spawn point
By the way, is it also possible to add more spawn points and that the player spawns randomly on one of those?
I have a login system where I found some information about the spawnings, but I didn't get the whole idea.
I found this.
Код:
public OnGameModeInit() { print("Gamemode Started."); AddPlayerClass(79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return 1; }
Код:
if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""COLOR_WHITE"Registering...",""COLOR_RED"You have entered an invalid password.\n"COLOR_WHITE"Type your password below to register a new account.","Register","Quit"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(inputtext)); INI_WriteInt(File,"Cash",0); INI_WriteInt(File,"Rights",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_Close(File); SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); }
Код:
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); }
Код:
AddPlayerClass(79,1549.6141,-1675.5640,15.0438,91.6558,0,0,0,0,0,0);