[Help!] How to resolve Falling and VW player when they cant see anything during connect in game -
jesdynguyen - 16.05.2014
Sometime my player come to server and get falling in Red country drop there always death when falling in high and another got wrong vw cant see the icon , player , house , door , just empty only their alone on map , this is so difficult for me have to teleport them back and revive them in red country when they got falling .
My english so bad sorry , hope you understand and tell me what will i do for this problem
Thanks to visit my topic
Re: [Help!] How to resolve Falling and VW player when they cant see anything during connect in game -
saikumar - 16.05.2014
Post the code from your gamemode
pawn Код:
public OnPlayerSpawn(playerid)
{
/////the code from here in your gamemode
}
Re: [Help!] How to resolve Falling and VW player when they cant see anything during connect in game -
SAMProductions - 16.05.2014
I don't know what the hell are you talkin' about junior, but i think you want it like this :-
pawn Код:
forward LoadingF(playerid);
public LoadingF(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}
and OnPlayerSpawn :-
pawn Код:
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid, 0);
SetTimerEx("LoadingF", 2000, 0, "d", playerid);
GameTextForPlayer(playerid,"~w~Waiting for the Environments to Load.", 2000, 3);
}
Just change "2000" to your desired Timer, change "3" to your desired Style, and change "~w~" to your desired Text Color.
2000 = 2 Seconds.
3 = Middle.
~w~ = White.
Codes (New Lines + Colour Lighter + Colors) :-
Код:
~n~ New Lines (Break)
~r~ - Red
~g~ - Green
~b~ - Blue
~w~ - White
~y~ - Yellow
~p~ - Purple
~l~ - Black
~h~ - Turns your Text Colour more Lighter (used too much will make your Text White, doesn't work on Black Color)
Some other Special Text Letters :-
Код:
~u~ - Up Arrow (Grey)
~d~ - Down Arrow (Grey)
~<~ - Left Arrow (Grey)
~>~ - Right Arrow (Grey)
] - Will display a "*" Symbol (Only in Text Styles 3, 4 and 5)
Styles (0-6) :-
Style 0 - Middle Corner (Large Size + Orange Color)
Style 1 - Right Corner (Medium Size + Orange Color)
Style 2 - Middle Corner (Large Size + Old English Font + White Color)
Style 3 - Middle Corner + Above 5% (Small Size + Orange Color)
Style 4 - Middle Corner + Above 10% (Small Size + Orange Color)
Style 5 - Middle Corner (Small Size + White Color)
Style 6 - Above (Medium Size + White Color)
EDIT :-
Post your OnPlayerSpawn Callback here
Re: [Help!] How to resolve Falling and VW player when they cant see anything during connect in game -
jesdynguyen - 16.05.2014
Here guys
Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
if(!gPlayerLogged{playerid})
{
SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!");
Kick(playerid);
return 1;
}
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
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;
}
if(InsidePlane[playerid] != INVALID_VEHICLE_ID)
{
SetPlayerPos(playerid, GetPVarFloat(playerid, "air_Xpos"), GetPVarFloat(playerid, "air_Ypos"), GetPVarFloat(playerid, "air_Zpos"));
SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "air_Rpos"));
SetPlayerHealth(playerid, GetPVarFloat(playerid, "air_HP"));
SetPlayerArmour(playerid, GetPVarFloat(playerid, "air_Arm"));
SetPlayerWeaponsEx(playerid);
SetPlayerToTeamColor(playerid);
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
SetPlayerInterior(playerid, GetPVarInt(playerid, "air_Int"));
DeletePVar(playerid, "air_Xpos");
DeletePVar(playerid, "air_Ypos");
DeletePVar(playerid, "air_Zpos");
DeletePVar(playerid, "air_Rpos");
DeletePVar(playerid, "air_HP");
DeletePVar(playerid, "air_Arm");
DeletePVar(playerid, "air_Mode");
DeletePVar(playerid, "air_Int");
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, InsidePlane[playerid]);
return 1;
}
SyncPlayerTime(playerid);
if(GetPVarType(playerid, "STD")) {
DeletePVar(playerid, "STD");
}
Re: [Help!] How to resolve Falling and VW player when they cant see anything during connect in game -
jesdynguyen - 16.05.2014
that my public OnPlayerSpawn(playerid) in my gamemode , help me fix this
Re: [Help!] How to resolve Falling and VW player when they cant see anything during connect in game -
jesdynguyen - 16.05.2014
anyone help me my problem
Re : [Help!] How to resolve Falling and VW player when they cant see anything during connect in game -
Ramoboss - 16.05.2014
To solve the virtual world problem, add :
SetPlayerVirtualWorld(playerid, 0);
then for the Red County problem, i don't have any idea !
Re: [Help!] How to resolve Falling and VW player when they cant see anything during connect in game -
Andreas1331 - 16.05.2014
Have you tried forcing the player to spawn in the correct VirtualWorld? I don't know if it's going to work, as world 0 is already the default one but give it a shot anyway.
SetPlayerVirtualWorld(playerid, 0);
In OnPlayerSpawn.
EDIT: Didn't see this was already suggested..