19.09.2013, 14:46
Hello
I am using an alternative way of class selection, however I'm not sure if it is safe...
So does anyone maybe know if this way of class selecting is a good idea or not?
here's what I do:
So basically instead of using the addplayerclass function to set a player skin and pos I use SetPlayerPos and SetPlayerSkin seperately...
Is that ok? or can it lead to problems?
Thanks in advance =)
I am using an alternative way of class selection, however I'm not sure if it is safe...
So does anyone maybe know if this way of class selecting is a good idea or not?
here's what I do:
pawn Код:
public OnGameModeInit()
{
AddPlayerClass(1, 0.0,2987.9231,3.1354, 130.3651, 0, 0, 0, 0, 0, 0); //I add one class to avoid bugs
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetTimer("RequestTimer", 2222, false);
new file[64],PlayerName[25];
GetPlayerName(playerid,PlayerName,sizeof PlayerName);
format(file,sizeof file,"Admin/%s.ini",PlayerName);
if(!fexist(file) && PInfo[playerid][Logged] == 0)
{
Register(playerid);
}
if(fexist(file) && PInfo[playerid][Logged] == 0)
{
Login(playerid);
}
SetPlayerPos(playerid,-3074.7300,2987.9231,3.1354);
SetPlayerFacingAngle(playerid,130.3651);
InterpolateCameraPos(playerid,-3108.9041,2966.4634,12.2926,-3100.8394,2964.5935,10.7787, 2000, CAMERA_MOVE);
InterpolateCameraLookAt(playerid,-3100.8394,2964.5935,10.7787, -3068.4573,2987.2256,2.2427 + 3, 2000, CAMERA_MOVE);
return 1;
}
Is that ok? or can it lead to problems?
Thanks in advance =)

