01.03.2012, 00:49
pawn Код:
public OnPlayerConnect( playerid ) {
if( fexist( find_accPath( playerid ) ) ) { //They are returning users - Account already exists!
INI_ParseFile(find_accPath(playerid), "LoadAccount_%s", .bExtra = true, .extra = playerid);
LOGDIALOG;
}
else { //They are new users - Account does not exist!
REGDIALOG;
}
SetPlayerTime(playerid, 0, 0);
JoinVehicle[ playerid ] = CreateVehicle ( 411, 92.7663, -164.9878, 2.5938, 269.3596, 3, 3, 360000 );
SetVehicleVirtualWorld( JoinVehicle[ playerid ], playerid+1 );
SetPlayerVirtualWorld( playerid, playerid+1 );
PutPlayerInVehicle( playerid, JoinVehicle[ playerid ], 0 );
TogglePlayerControllable( playerid, 0 );
TogglePlayerSpectating( playerid, 1 );
SetPlayerCameraPos( playerid, 100.9195, -164.8617, 2.5182 );
SetPlayerCameraLookAt( playerid, 92.7663, -164.9878, 2.5938 );
firstSpawn[ playerid ] = true;
return true;
}
public OnPlayerSpawn( playerid ) {
if(firstSpawn[ playerid ] == true ) {
DestroyVehicle( JoinVehicle[ playerid ] );
TogglePlayerSpectating( playerid, 0 );
SetPlayerVirtualWorld( playerid, 0 );
SetCameraBehindPlayer( playerid );
firstSpawn[ playerid ] = false;
}
return true;
}