Problem
#1

so I made if saving,loading look if im in interior I fall from sky..i don't know how to do look if player relogs in interior he falls when spawns..

PHP код:
SetPlayerPos(playeridPlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
                    
GetPlayerVirtualWorld(playerid);
                    
GetPlayerInterior(playerid);
                    
SetPlayerInterior(playeridGetPlayerInterior(playerid));
                    
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(playerid)); 
Reply
#2

Sorry, i cant understand what you want to fix in that script?
Reply
#3

Quote:
Originally Posted by Akcent_Voltaj
Посмотреть сообщение
so I made if saving,loading look if im in interior I fall from sky..i don't know how to do look if player relogs in interior he falls when spawns..

PHP код:
SetPlayerPos(playeridPlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
                    
GetPlayerVirtualWorld(playerid);
                    
GetPlayerInterior(playerid);
                    
SetPlayerInterior(playeridGetPlayerInterior(playerid));
                    
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(playerid)); 
You have to SAVE player's interior in an variable or enum when he wishes to RELOG and LOAD it back when the player rejoins.
Reply
#4

I tested this and it works fine for me.
Reply
#5

if I relog in PD with int 6 if I relog I have int 0 ..and I fall..
Reply
#6

Quote:
Originally Posted by Littlehelper[MDZ]
Посмотреть сообщение
You have to SAVE player's interior in an variable or enum when he wishes to RELOG and LOAD it back when the player rejoins.
I don't know howww...plz help...
Reply
#7

anyone help?
Reply
#8

Okay....
pawn Код:
// you know where to place this...
new GetInterior[MAX_PLAYERS];

OnPlayerDisconnect(..) {
GetPlayerInterior(GetInterior[playerid]); // we are getting player's Interior and saving it in GetInterior variable
//code

OnPlayerSpawn(..) {
SetPlayerInterior(GetInterior[playerid]); // here we are LOADING the player's interior which is saved in the variable GetInterior
//code
Now look, you have to SAVE the variable too with what ever saving system you use like you saved your heath,cash etc and load it back on OnPlayerConnect.
This is JUST an example i'm not trying to spoon-feed.
Reply
#9

can I put it at OnPlayerSpawn..or it has to be at OnPlayerConnect?
Reply
#10

Quote:
Originally Posted by Akcent_Voltaj
Посмотреть сообщение
can I put it at OnPlayerSpawn..or it has to be at OnPlayerConnect?
Yes, OnPlayerSpawn it is.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)